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 contact creation #311

Merged
merged 2 commits into from
Nov 6, 2023
Merged

Fix contact creation #311

merged 2 commits into from
Nov 6, 2023

Conversation

paultranvan
Copy link
Contributor

@paultranvan paultranvan commented Oct 31, 2023

When creating a new contact, a Cozy Contact service is triggered with a
5 sec debounce. This service updates the contact and create a new _rev,
which can cause conflicts. And when conflicts arise, the contact is
never actually linked to the trip in database, making the feature
pointless. Even worse, the user was never informed about it, the error
being silent.

Fortunately, the Cozy realtime is there to dynamically updates the contact
with the new data.
Unfortunately, this was not properly handled: the contact itself was
never queried, and, once queried, never set in the state.

The conflicts should now be avoided, making the world a better place.
And for even more peace, see: cozy/cozy-client#1414

### ✨ Features

* 

### 🐛 Bug Fixes

* Fix failed trip association with contact addresses  

### 🔧 Tech

* Add script option to remove relationships

When creating a new contact, a Cozy Contact service is triggered with a
5 sec debounce. This service updates the contact and create a new _rev,
which can cause conflicts. And when conflicts arise, the contact is
never actually linked to the trip in database, making the feature
pointless. Even worse, the user was never informed about it, the error
being silent.

Fortunately, the Cozy realtime is there to dynamically updates the contact
with the new data.
Unfortunately, this was not properly handled: the contact itself was
never queried, and, once queried, never set in the state.

The conflicts should now be avoided, making the world a better place.
Copy link

bundlemon bot commented Oct 31, 2023

BundleMon

Unchanged files (4)
Status Path Size Limits
vendors/coachco2.(hash).js
1.78MB -
app/coachco2.(hash).js
58.77KB -
vendors-coachco2.(hash).(hash).min.css
34.84KB -
app-coachco2.(hash).min.css
355B -

Total files change +8B 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@JF-Cozy
Copy link
Contributor

JF-Cozy commented Nov 6, 2023

Tu n'as pas besoin de mettre de changelog dans la PR, les modifs ne sont pas relatives à la précédentes versions. Ce n'est donc pas un fix

@paultranvan paultranvan merged commit 3261e5c into master Nov 6, 2023
@paultranvan paultranvan deleted the fix-contact-creation branch November 6, 2023 09:18
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