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

RelationReference fields can't be properly updated #312

Closed
arantzaetxebarria opened this issue Sep 29, 2023 · 1 comment
Closed

RelationReference fields can't be properly updated #312

arantzaetxebarria opened this issue Sep 29, 2023 · 1 comment
Labels
solved Solution developed and accepted, not yet deployed Type: Bug Something isn't working
Milestone

Comments

@arantzaetxebarria
Copy link
Collaborator

This error happens when updating the information on a RelationReference type field.
If the user removes the value and selects a new one, the Registry creates a draft with the edited version. This draft has the correct information, but when approving the changes to turn it into Valid state, and publish the item, both the old relation and the new one proposed appear in the administration tool and in the Front end.

How to reproduce

Here's an example illustrated by screenshots to help me explain the issue.
This item has the Application Schema field, which is of type RelationReference.
image

Now. the Application Schema field is updated.
image

After clicking on "Accept clarification" a draft is created.
image

Now, after approving the changes instead of replacing the information with the new one, both appear.
image

Note: this bug has been reproduced in version v2.3.0

@arantzaetxebarria arantzaetxebarria added the Type: Bug Something isn't working label Sep 29, 2023
@arantzaetxebarria arantzaetxebarria added under development A solution is being developed under analysis A first analysis is performing labels Oct 3, 2023
@arantzaetxebarria arantzaetxebarria added this to the v2.5.2 milestone Oct 3, 2023
@arantzaetxebarria arantzaetxebarria removed the under development A solution is being developed label Oct 3, 2023
@arantzaetxebarria arantzaetxebarria added under development A solution is being developed and removed under analysis A first analysis is performing labels Nov 23, 2023
EnekoRuiz added a commit that referenced this issue Dec 1, 2023
@arantzaetxebarria arantzaetxebarria added ready for testing Solution is ready to test and removed under development A solution is being developed labels Dec 14, 2023
unaibrrgn added a commit that referenced this issue Dec 21, 2023
@EnekoRuiz
Copy link
Collaborator

Implemented code so the item's old relations are correctly removed. The problem was that when changing the value of the relation the new one was stored but the old one was never deleted.

@arantzaetxebarria arantzaetxebarria added solved Solution developed and accepted, not yet deployed and removed ready for testing Solution is ready to test labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved Solution developed and accepted, not yet deployed Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants