huridocs / uwazi

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

Problems with V2 thesauri #6699

Closed Zasa-san closed 1 week ago

Zasa-san commented 4 months ago

After #6698 we detect the following critical problems:

Thesauri needs better testing in general.

### UI issues
- [x] When creating a group the sidepanel save button should say 'Add group'
- [x] When editing a group the sidepanel save button should say 'Edit group'
- [x] Same for item create and edit ('Add' / 'Edit')
- [x] On the settings -> thesauri and on each individual thesaurus, the EDIT button has a disabled look (the border is not "deep blue") and hovering over them has no action.
- [ ] https://github.com/huridocs/uwazi/issues/7043
- [ ] https://github.com/huridocs/uwazi/issues/6696
- [ ] https://github.com/huridocs/uwazi/issues/6959
- [ ] https://github.com/huridocs/uwazi/issues/6676
- [ ] https://github.com/huridocs/uwazi/issues/6906
- [x] It is not possible to translate thersaurus names or values
### Validation
- [x] Please see #6696
- [x] You can delete groups and items and there is no warning as to the effect that this will have on the collection. We could add a warning before saving letting users now what items where removed and that that will have an effect on entities using those items.
### Testing
- [x] Unit tests for helpers
- [x] Redo E2E, it must check effects of changing thesauri (or do some of this in a unit test)
- [x] Adding thesauri
- [x] Adding groups
- [x] Editing thesauri
- [x] Editing group names and group item names
- [x] Deleting items
- [x] All of the above checked with library
### Code quality
- [x] There are `ts-ignore`s. Those ts warning are right, and instead of ignoring we should fix them
- [x] eslint problems. Be careful about having an environment that displays eslint errors for import sorting, arrow function styles, self closing tags, etc.
salvalacruz commented 3 months ago

I add this but I guess you already know it: when creating a new theasurus and directly adding some entities, you get this:

image

To carry on, you need to create the thesaurus, write the name, save it, exit the scren, enter again and then you can add items.

salvalacruz commented 2 months ago

I add this issue https://github.com/huridocs/uwazi/issues/6906, regarding items and groups in thesauri configuration.

serena-huridocs commented 1 month ago

I add this but I guess you already know it: when creating a new theasurus and directly adding some entities, you get this:

image

To carry on, you need to create the thesaurus, write the name, save it, exit the scren, enter again and then you can add items.

Hi @salvalacruz! A quick clarifying question regarding this behavior: does this mean that whenever a user wants to make another edit to a thesaurus, they need to exit the thesaurus modification window and then enter it once again to edit the same thesaurus?

salvalacruz commented 1 month ago

Hi @salvalacruz! A quick clarifying question regarding this behavior: does this mean that whenever a user wants to make another edit to a thesaurus, they need to exit the thesaurus modification window and then enter it once again to edit the same thesaurus?

Hi @serena-huridocs I do not think we are talking about the same. My issue is about this flow:

  1. Go to Teshauri and Add a new one.
  2. Type a name and Save.
  3. Click on 'Add Item' and type a couple of values; click Add.
  4. Click 'Save' then you get an error: image
serena-huridocs commented 1 month ago

Hi @salvalacruz! A quick clarifying question regarding this behavior: does this mean that whenever a user wants to make another edit to a thesaurus, they need to exit the thesaurus modification window and then enter it once again to edit the same thesaurus?

Hi @serena-huridocs I do not think we are talking about the same. My issue is about this flow:

  1. Go to Teshauri and Add a new one.
  2. Type a name and Save.
  3. Click on 'Add Item' and type a couple of values; click Add.
  4. Click 'Save' then you get an error: image

Thanks for the clarification, @salvalacruz! Yes, I was actually referring to the same behavior, I also saw errors with the same message when trying to edit Thesauri :) I just started thinking about potential workarounds for the issue and wrote to you to see if you are describing a possible way to avoid triggering the issue in the comment above. Anyway, thanks for the detailed answer!