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

Fix(BB-538): Allow concurrent relationship edits #876

Merged
merged 9 commits into from
Sep 12, 2022

Conversation

tr1ten
Copy link
Collaborator

@tr1ten tr1ten commented Sep 3, 2022

Problem

Reference ticket BB-538
Since we use old relationship items to generate the difference array of allRemovedItems & allAddedItems, this cause issue where we don't have updated rel items.

Solution

We can just use two new attributes on rel to track removed and added items, this will ensure difference array is independent of old rel items.
Since Orm function need some changes to support this workflow, i will be creating similar PR there.
Edit: PR

Tasks

  • Test showing this behavior
  • ORM PR

tr1ten and others added 7 commits September 5, 2022 21:54
We were calling updateRelationshipSets with undefined instead of the array of relationships
This is for relationships that are automatically added to a form vie the use of a query parameter (for example "add work" button on an edition's page), as well as relationships that are created when merging entities
@MonkeyDo
Copy link
Member

MonkeyDo commented Sep 9, 2022

I'm thoroughly testing the PR locally, seems to be working in most cases.
I made a couple of changes to handle special cases where we add relationships manually on the server side (pre-filling rels with query parameters, and when merging entities)

@MonkeyDo MonkeyDo changed the base branch from master to new-creation-form September 12, 2022 14:26
@MonkeyDo MonkeyDo changed the base branch from new-creation-form to master September 12, 2022 14:34
@MonkeyDo MonkeyDo merged commit 09f344f into metabrainz:master Sep 12, 2022
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.

2 participants