huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
237 stars 79 forks source link

Filter settings [Drag and drop]: When all items dragged out from the group, the group becomes a new filter item #6820

Closed serena-huridocs closed 1 month ago

serena-huridocs commented 4 months ago

Describe the bug When a user extracts all the items from the group in the filter settings, the group becomes a filter. It seems to be a bug because we use entity types (templates) for the creation of primary filters; labels that we use for grouping should not become filters. As a result, when a former group name is displayed on the filters panel, it always shows 0 entities, because there is no template associated with it.

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings and navigate to Filters from the left menu
  2. Add group and add entity types to the group
  3. Save the change
  4. Drag all the entity types belonging to the group outside of the group
  5. See that the group is displayed as a filter item as a result

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot 2024-05-24 at 15 35 25

Filter testing was a group before. It turned into a filter item after we extracted all the items from it.

Device (please select all that apply)

Browser Chrome

Additional context The issue was discovered during the testing of the fix #6782#6782 by the testing group 3 (@oleksandrako @pddocs).

aphilop commented 4 months ago

@serena-huridocs @oleksandrako @pddocs Thanks for reporting this! I can see in the filters the entry Filter testing that indicates that something went wrong. Unfortunately, I cannot reproduce this bug with the provided steps. I can create a group, add entities and save it, and then when I remove all items from the group, the group is automatically deleted.

  1. When was this tested?
  2. Might be there are additional steps/conditions, which led to the behavior you observed, that I am missing in order to reproduce the bug?
aphilop commented 4 months ago

After discussing with @serena-huridocs, the bug still persists. The description would be updated to make clearer the steps to reproduce.

aphilop commented 1 month ago

Will be handled with #7052