Project

General

Profile

Data have been updated by another user

Added by Daniel Stine over 16 years ago

Hello all,

We've recently begun using the Redmine issue tracker and find it to be a well written and extremely useful application. However, I haven't had the time to dig into all the Ruby details to debug this issue myself yet. I'm asking if anyone has a quick explanation/solution for the run-time error message "Data have been updated by another user"?

I'm runnning v0.6.3 on Windows XP, SQLite database, Mongrel standalone server on an internal private network.

It seems that I've violated some sort of locking/concurrent-updating contraint. Possibly caused by opening multiple tabs in the same (Firefox) browser and browsing/updating the same issue.

I can update some fields, (eg. Description) but receive this error when I try to change the Status.

How do I clear the lock or otherwise resynchronize the Issue?

Thanks,
Dan


Replies (4)

RE: Data have been updated by another user - Added by Daniel Stine over 16 years ago

I've looked at the code now and it seems to be a simple
ActiveRecord::StaleObjectError exception which is handled by
flash[:error] = l(:notice_locking_conflict)

It's in two places in issues_controller.rb -- change_status and edit.

Sorry to sing the same old song, but I'm also new to Ruby and Rails.
(twenty years experience in C/C++)

Can anyone explain briefly how the saved sessions interact with the record locking and what I can do to clear the lock and finally update my issue?

I'll keep researching in the meantime...

Dan

RE: Data have been updated by another user - Added by Daniel Stine over 16 years ago

Seems like I'm having a conversation with myself...

The problem is not related to multiple browser windows but with relating issues as duplicates of each other.

I have three issues eg. A,B and C that are all reporting the same bug.

Issues A and B were entered first and related as duplicates of each other.
I didn't immediately notice that changing the state of one of these also changed the state of it's duplicate.

Later, C was added and related as a duplicate of both A and B.

Attempting to change the state of this third duplicate (triplicate?) somehow causes the StaleObject exception.

I'm not well enough informed to enter a bug report to Redmine, but if someone else cares to refine my explanation this looks like a bug in Redmine.

I worked around it by deleting the duplicate relationships between C and AB. I was then able to change the state of C successfully.

RE: Data have been updated by another user - Added by Thomas Lecavelier over 16 years ago

Hi Dave,

You're explanations are far enough documented to be taken into account as defect. Don't hestitate to sum-up this bug in the defect tracker, pointing this thread. Locking require a good knowledge of Rails ActiveRecord class, and the fact that Redmine has to run the same with Rails 1.2.* and Rails 2.* should make things harder. Please, don't forget to precise what version of Rails you're using.

Tom.

RE: Data have been updated by another user - Added by Daniel Stine over 16 years ago

Thanks Tom. It's Defect 1105.

Dan

    (1-4/4)