Defect #32912

Rails 6: update no longer bypass optimistic locking

Added by Pavel Rosický over 1 year ago. Updated 7 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:


Category:Rails support
Target version:-
Resolution:Fixed Affected version:


fixes test failures

 ActiveRecord::StaleObjectError: Attempted to update a stale object: Issue.
    app/models/issue.rb:214:in `create_or_update'

stale.patch Magnifier (3.19 KB) Pavel Rosický, 2020-01-29 00:35

Related issues

Related to Redmine - Feature #29914: Migrate to Rails 6.1 New

Associated revisions

Revision 20884
Added by Go MAEDA 7 months ago

Fix "ActiveRecord::StaleObjectError: Attempted to update a stale object: Issue." (#29914, #32912).

Patch by Pavel Rosický.


#1 Updated by Pavel Rosický over 1 year ago

I'm not sure about test_copy_should_not_copy_subtasks_twice_when_saving_twice which was introduced in

it should be probably refactored in order to reflect the new behaviour or confirm if it's still valid

#2 Updated by Marius BALTEANU over 1 year ago

#3 Updated by Go MAEDA over 1 year ago

  • Category set to Rails support

#4 Updated by Marius BALTEANU 7 months ago

  • Tracker changed from Patch to Defect

#5 Updated by Go MAEDA 7 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed as a part of #29914.

Also available in: Atom PDF