Skip to content

SDC-970 - Update dataproduct filter mechanism

Robbie Luijben requested to merge SDC-970/filter-surls-filenames into main

image

The dataproduct filter mechanism has been updated to be a bit smarter. It now uses Django's Q objects to do complexer queries.

  • DataProductFilter model was updated with two extra properties:
    • inclusion_type: whether a filter should query as include (default) or exclude (basically a NOT... query)
    • cardinality_type: whether a filter should work on multiple values for the same field (e.g., AND x like a AND x like b ... )
  • The user interface is modified slightly, the filter specification on the "Create/Update" screen now displays a <textarea> for filters with multiple values. Multiple values are separated by newline (anything fancier would make this story a lot more effort)
  • Next to a migration for the extra columns, there is also a data migration that adds/modifies the correct filters for the requested changes
  • Required fields on filters are changed: either a SAS id or project code is required (instead of always SAS ID)
Edited by Robbie Luijben

Merge request reports

Loading