huridocs / uwazi

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

Abrupt interaction when trying to add a thesaurus item on an empty group thesaurus #6695

Closed hyebin-bina closed 1 week ago

hyebin-bina commented 3 months ago
  1. User creates a group thesaurus without adding children items.
  2. User goes back to the thesaurus and tries to add items afterwards.
  3. The editing box abruptly gets closed as soon as user clicks the "Add" button without any disclaimer or error message, giving the impression that the system is throwing an error (see the attached screencast).

If our intention is to allow grouped thesaurus only when there are children items, we should prevent the users at an earlier stage when they try to save without putting the children items.

https://github.com/huridocs/uwazi/assets/85096417/f661826a-d9d3-4fa8-b560-6910cbc9c432

RafaPolit commented 2 months ago

This is also reported as the Thesaurus V2 roadmap here: #6699 and #6696

The real issue here is:

Empty Groups, if they have no children, are treated as "root non-group elements".

This should use similar validations as in filters, where creating and empty group disables the save until you actually put a value in it.

aphilop commented 1 week ago

Closing this as duplicate to https://github.com/huridocs/uwazi/issues/6696