Signalen / frontend

Frontend for Signalen, an application that helps cities manage and prioritize nuisance reports.
https://signalen.org
Mozilla Public License 2.0
10 stars 4 forks source link

Filter "Afdeling" does not work correctly for categories with one Afdeling #124

Closed someren closed 2 years ago

someren commented 3 years ago

Describe the bug A user working for department WXL created a filter: Toegewezen aan: j.doesburg@s-hertogenbosch.nl + categorie = Graffiti & Beplakking. He then added Afdeling = WXL and signal 2020 dissapeared from the list.

Since categorie Graffiti & Beplakking has only one department, this is rather strange. It should not have dissapeared from the results. I have looked at all signals and concluded the following: only signal 2020 (the one that dissapears) was entered in Signalen with categorie "overig". It was manually corrected to "Graffiti & Beplakking". All other signals got the categorie "Graffiti & Beplakking" from the start. The routing expression makes sure that these signals are directly assigned to department WXL.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Filter'
  2. Create the following filter: Toegewezen aan = j.doesburg@s-hertogenbosch.nl + categorie = Graffiti & Beplakking
  3. Click "Filteren"
  4. Check the list and see if signal 2020 is present
  5. Click on "Filteren" and add Afdeling = Weener XL
  6. Click on "Filteren" and check if signal 2020 is still present (it probably dissapeared).

Expected behavior Since categorie Graffity & Beplakking only has one department, it should not matter if the filter Afdeling is added or not. The signal should always be shown when categorie "Graffity & Beplakking" is selected.

Screenshots signalen 2020

Desktop (please complete the following information):

CBuiVNG commented 3 years ago

Regarding the filter on assigned department: there are 2 flows where we can get an association between department and signal 1) implicit via category 2) explicitly assigned via routing

You are filtering category (using 1) and after step 5 you are using the routing department. These are 2 different flows. When you filter via method 2, an assignment has to exist (via routing). For this testcase, that's not the case (only the implicit association is known), and the filter will yield empty.

I agree that this can be a bit confusing, and we might need to think of a way to make this more intuitive. For now this works as designed.

someren commented 2 years ago

Getest, speelt nog steeds.

someren commented 2 years ago

Correctie! Op accp hadden de melding geen afdeling. Probleem lijkt inmiddels opgelost. Story gesloten