huridocs / uwazi

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

Thesauri / All items are deleted when trying to remove a duplicated value #7043

Closed salvalacruz closed 1 month ago

salvalacruz commented 2 months ago

Describe the bug When adding an item in a thesaurus, if this value already exists and then you must delete it, the whole list of values disappear.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Settings - Thesauri' and select a thesaurus. image

  2. Add an item with a duplicate value on purpose. image

  3. When trying to save it, the system send a warning. image

  4. Select the duplicated item and click on Remove. image

  5. See error: every item has de dissappeared. image

Expected behavior Only the duplicated and selected item should be removed.

RafaPolit commented 2 months ago

Please, ensure that all the thesaurus operations are using IDs or temporary IDs and NEVER labels. This problem is not the only issue with duplicated name values, which suggests an inconsistency there.