Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid duplicate labels from Key-Values #414

Merged

Conversation

will-moore
Copy link
Member

Fixes #395

To test:

  • Add duplicate Key-Value pairs to an Image
  • Choose that Key when adding labels to the image from key-value pairs.
  • Only 1 label should be created on each Panel for the duplicate Key-Value pairs.

@jburel
Copy link
Member

jburel commented Jan 6, 2021

Discussed with @will-moore, it is currently not possible to add kvp in web using merge-ci.
This is currently broken

@will-moore
Copy link
Member Author

@jburel Thanks for finding that. Fixed in open PR: ome/omero-web@60dece6

@jburel
Copy link
Member

jburel commented Jan 7, 2021

using https://merge-ci.openmicroscopy.org/web/webclient/?show=image-83165 (user-1)

  • created a duplicate kvp
  • in figure, only one key listed

Screenshot 2021-01-07 at 16 20 50

* I can add the same kvp multiple times (unexpected)

Screenshot 2021-01-07 at 16 23 20

* only one entry in the right-hand panel for the kvp (see screenshot) * Click on red cross to remove, remove all the duplicated entries

@will-moore
Copy link
Member Author

Ah, that's a slightly different issue. In that case you have chosen to add the same label repeatedly, which will cause the same issue, regardless of whether it comes from KV pairs, or other metadata or is added manually.
I'm not sure that this is really a bug. Although you could consider the batch edit and delete behaviour to be unexpected. But that behaviour has always been the same an no-one has complained so I think it would need more discussion to change it and is outside the scope of #395 so I would prefer to just get the existing fix in for now.

@jburel jburel merged commit bddb24c into ome:master Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Duplicate labels from Key-Value pairs
2 participants