Adjustments in QSObservation
Some additional changes are required for existing QSObseravtion flow.
JIRA story: https://ufz-jira.scolution.de/browse/MWB-294
Data model: https://confluence.digitalearth-hgf.de/pages/viewpage.action?pageId=16716827
- Statuses (ordered by proprity):
- -1 = default unbewertet (Grau)
- 0 = plausibel (Hellgrün)
- 1 = bestätigt (Dunkelgrün)
- 2 = fragwürdig (Orange)
- 3 = falsch (Rot)
AC
-
change qs_proposal (bool) to qs_final(bool) - to mark the QSObservation as final (instead marking all other as proposals) -
State dependencies. There can exist multiple QSObseravtions for a single Observation. -
When one of those is marked final (qs_final set to true), qs_final for all other QSObseravtion for that Observation must be set to false. In this moment, the value from final QSObservation.qs_species is copied to Observation.species
- there is no dependency between qs_status and qs_proposal (no automatical setting on change of qs_status)
-
-
Access permissions -
Only admin and project lead can create QSObservation with is_final set to true -
non admin and non project lead can update their own QSObservations, but cannot change is_final -
Only admin, project lead, and country lead can change qs_final; regular users can see own QSObservations (update all fields but qs_final)
-
-
New field qs_status is added to ObservationAggregate. It contains the value of qs_status from QSObservation that is connected to Observation and has qs_final = true. -
If there are no connected QSObservations, ObservationAggregate.qSStatus should contain null -
If there are QSObservations connected, but none of them is marked final - highest status from ordered list of statuses (defined as above)
-
-
Tests
Review
-
change qs_proposal (bool) to qs_final(bool) - to mark the QSObservation as final (instead marking all other as proposals) -
State dependencies. There can exist multiple QSObseravtions for a single Observation. -
When one of those is marked final (qs_final set to true), qs_final for all other QSObseravtion for that Observation must be set to false. In this moment, the value from final QSObservation.qs_species is copied to Observation.species
- there is no dependency between qs_status and qs_proposal (no automatical setting on change of qs_status)
-
-
Access permissions -
Only admin and project lead can create QSObservation with is_final set to true
-
-
non admin and non project lead can update their own QSObservations, but cannot change is_final -
Only admin, project lead, and country lead can change qs_final; regular users can see own QSObservations (update all fields but qs_final)
-
-
New field qs_status is added to ObservationAggregate. It contains the value of qs_status from QSObservation that is connected to Observation and has qs_final = true. -
If there are no connected QSObservations, ObservationAggregate.qSStatus should contain null -
If there are QSObservations connected, but none of them is marked final - highest status from ordered list of statuses (defined as above)
-
-
Tests
Edited by Michael Voigt