Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to test if data has changed?

phil huynh March 9, 2017

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?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2017

 Test against what and when?  The user saves data when they commit it.

phil huynh March 9, 2017

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2017

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.

TAGS
AUG Leaders

Atlassian Community Events