Ticket #688 (new Bug)
possible hole in questionnaire cardinality checks
| Reported by: | rupert | Owned by: | gerry |
|---|---|---|---|
| Priority: | critical | Milestone: | V1.2 Questionnaire release |
| Component: | WP6 - CMIP5 Questionnaire | Version: | |
| Keywords: | Cc: | charlotte | |
| Requirement: | http://metaforclimate.eu/Work-Package-2/Developing-the-CIM/Project-Requirements-summary.htm | ||
Description
Questionnaire cardinality errors are only flagged when a page is saved. So what happens if some pages are not saved but the user decides to press the export to CMIP5 button? Does this mean that "invalid" pages can get slip through? I placed this against 1.0 but it can presumably be pushed to 1.1, if it is a problem at all.
Change History
comment:2 Changed 3 years ago by rupert
What I mean is checks for mandatory fields, such as a long name. Any errors appear with red dots next to them when you try to press save.
What I am worried about is if it is possible to get to a stage where someone checks that the questionnaire instance is valid, finds out that it is and presses send to cmip5, but happens to have some mandatory fields empty (as they have never saved that particular page).
It may not be possible by design, or by luck (e.g. the fact that validation requires properties to be filled in thereby requiring many pages to be saved may cover all the issues). I just wanted to raise this as a possibility.
So here is a (silly) example. Someone creates a new model, they switch off all components except the top level one and the aerosol one. They are left with a model with no properties and two components. It so happens that the aerosol component does not have a long name. However the model will pass the validation stage as there is nothing wrong with it from a validation point of view (as validation assumes simple mandatory checks are done by the questionnaire). Presumably the send to cmip5 button could then be pressed and an instance persisted. This instance is not valid as it does not have a long name for the Aerosol component but this check was never performed because the aerosol page was never saved.
Does that made any sense?
comment:5 Changed 3 years ago by charlotte
Surely if a page has never been saved it won't be part of the output because the information won't have made it to the database.
comment:6 Changed 3 years ago by rupert
When you create a new instance of something then some information is saved in the database without you having to explicitly save anything. This is true for grids and models.
For example. Assuming we start with an existing simulation ...
1: create a new grid but do not change any of its values 2: associate the grid with the model associated with our simulation 3: export from the simulation page. The new grid appears in our xml output. I suspect the same thing will happen when we publish i.e. our grid is publishable
4: Go to the new grid page (by pressing edit) 5: Go to the "Model Component Grid" subpage 6: press save 7: Oh dear.

What are cardinality errors?