Observation - show flag if pictures exist
As an API user, I want to be able to filter observations that have (or have not) pictures (ImageRefs)
AC
-
field hasImages
(bool) is added to ObservationAggregate. This field is aggregated from underlying ImageRefs - if any ImageRef exist it is set to true (otherwise false) -
it is possible to search by this field, aggregate_hasImages_is: true
-
view_observation_aggregates
is changed and SQL is added to next release file in foldersql/releases
(DROP existing view_observation_aggregates and create new one) -
Existing tests are running
Review
-
filed hasImages (bool) is added to ObservationAggregate. This field is aggregated from underlying ImageRefs - if any ImageRef exist it is set to true (otherwise false) -
it is possible to search by this field, aggregate_hasImages_is: true
-
view_observation_aggregates
is changed and SQL is added to next release file in foldersql/releases
(DROP existing view_observation_aggregates and create new one) -
Existing tests are running
Question: ask Lars if it would be better to have count of images (for sorting by number of images)
^ hasImage suffices
Edited by Michael Voigt