If two users try to edit the same record. Is there a way to test against the current record and whats on the 'server' to see if it has changed?
Community moderators have prevented the ability to post new answers.
Test against what and when? The user saves data when they commit it.
I have a custom field. But since there is no blocking two people could update the field at the same time. Is there a way to test if the data has been changed before a commit? i.e first person does a commit... but then second person will do a commit after and overwrite the first persons input. Id like to test that the data has changed from original and send a warning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see, you're thinking of the update sequence.
User Alice opens the issue for edit, and puts some changes into it. A few seconds later, Bob does the same. Your concern is that if Bob commits the change before Alice, then Alice's changes will overwrite his.
Instinctively, that sounds scary, but it really isn't. One of them will commit a change before the other. The second person's change will then update the data over the top of the first. Thinking it through, there is no problem here. Both changes are applied, and in the order they're performed. The history will show both. If it helps, imagine Alice and Bob are making the changes hours apart - then it does not feel like any problem at all. But it does when it's a few seconds? That's not really relevant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.