molgenis / molgenis-emx2

MOLGENIS EMX2, the latest version of the MOLGENIS data platform.
GNU Lesser General Public License v3.0
11 stars 16 forks source link

Filtering in Variable Explorer needs tweaking (combination of search filters, topic filters and cohort filters, and how search filters behave) #3850

Closed EleanorHyde-UMCG closed 2 weeks ago

EleanorHyde-UMCG commented 1 month ago

What version of EMX2 are you using (see footer) Software version: v10.77.4

Describe the bug When filtering on variables using search filters, cohort filters and topic filters, the combination is not applied correctly, meaning that too many variables are shown.

Agreed-upon query is: (search bar criteria) AND (topic criteria) AND (cohort criteria)

The query within each place to filter is as follows: search bar: additive, searchterm1 AND searchterm2 topics: topic1 OR topic2 (or both) cohorts: cohort1 OR cohort 2 (or both)

To Reproduce Steps to reproduce the behavior:

  1. Go to https://data-catalogue-acc.molgeniscloud.org/testCatalogue/ssr-catalogue/all/variables
  2. Choose subtopic ‘family and household structure’ and subtopic ‘language’ (under 'socio-demographic...'--> you get 12 vars
  3. Add ‘birth’ in search bar --> list reduces to 3 vars
  4. Select cohorts ‘NFBC1966’, ‘PELAGIE’ and ‘SEPAGES’ --> all 3 vars are still shown
  5. Go to the Harmonisation Matrix (button 'Harmonisations'), see that all 3 vars are still shown
  6. Remove the selection of cohort PELAGIE
  7. See error: all 3 variables are still shown even though NFBC1966 and SEPAGES only have mappings to cohab_0.

Expected behavior Only cohab_0 should be shown. WILL FIND OTHER TEST DATA EXAMPLES LATER!

Screenshots

Image

Desktop (please complete the following information):

EleanorHyde-UMCG commented 1 month ago

@mswertz this is the bug we discussed yesterday. Currently in the backlog but definitely important enough to be done this sprint.

EleanorHyde-UMCG commented 3 weeks ago

see #3866

EleanorHyde-UMCG commented 2 weeks ago

In #3866 we said: cohorts which have been actively chosen are kept in the list, regardless of whether or not they have mappings to the variables in question.

This situation is subtly different but also rather similar. Do we need to say that we keep variables in the list which have been actively chosen, regardless of whether they have been mapped to by the selected cohorts? If so, this will throw an awful lot out of kilter...

EleanorHyde-UMCG commented 2 weeks ago

In #3866 we said: cohorts which have been actively chosen are kept in the list, regardless of whether or not they have mappings to the variables in question.

This situation is subtly different but also rather similar. Do we need to say that we keep variables in the list which have been actively chosen, regardless of whether they have been mapped to by the selected cohorts? If so, this will throw an awful lot out of kilter...

NO WE ARE NOT DOING THIS! Keep as is: only show variables with mappings. I have tested the search filter 'term A AND term B' and it looks good. Further testing in acc will most likely bear this out.