Defect #7920
closedAttempted to update a stale object when copying a project
0%
Description
When I try to copy a project 80 tasks, subtasks and relations, versions, Redmine returns this messsage:
ActiveRecord::StaleObjectError in ProjectsController#copy
Attempted to update a stale object
RAILS_ROOT: /var/www/redmine
Application Trace | Framework Trace | Full Trace
/var/www/redmine/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb:89:in `update_without_dirty'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/dirty.rb:146:in `update_without_timestamps'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/timestamp.rb:64:in `update_without_callbacks'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/callbacks.rb:282:in `update'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/base.rb:2874:in `create_or_update_without_callbacks'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/callbacks.rb:250:in `create_or_update'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/base.rb:2538:in `save_without_validation'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/validations.rb:1078:in `save_without_dirty'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/dirty.rb:79:in `save_without_transactions'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `send'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `with_transaction_returning_status'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in `save'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
/var/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in `save'
/var/www/redmine/app/models/issue.rb:542:in `reschedule_after_without_earlier_date'
/var/www/redmine/app/models/issue_relation.rb:88:in `set_issue_to_dates'
/var/www/redmine/app/models/issue_relation.rb:82:in `before_save'
/var/www/redmine/app/models/project.rb:729:in `copy_issues'
/var/www/redmine/app/models/project.rb:722:in `copy_issues'
/var/www/redmine/app/models/project.rb:714:in `copy_issues'
/var/www/redmine/app/models/project.rb:579:in `send'
/var/www/redmine/app/models/project.rb:579:in `copy'
/var/www/redmine/app/models/project.rb:578:in `each'
/var/www/redmine/app/models/project.rb:578:in `copy'
/var/www/redmine/app/models/project.rb:575:in `copy'
/var/www/redmine/app/controllers/projects_controller.rb:121:in `copy'
/var/www/redmine/app/models/mailer.rb:337:in `with_deliveries'
/var/www/redmine/app/controllers/projects_controller.rb:117:in `copy'
Request
Parameters:
{"enabled_modules"=>["issue_tracking",
"time_tracking",
"news",
"documents",
"files",
"wiki",
"repository",
"boards",
"calendar",
"gantt",
"budget_module",
"customer_module",
"ezfaq",
"redmine_blocks",
"charts",
"wiki_extensions"],
"commit"=>"Copiar",
"only"=>["members",
"versions",
"issue_categories",
"issues",
"queries",
"boards",
"wiki",
""],
"authenticity_token"=>"NVeCcahXzbXnygJw82iVbZFogwgeNEjkQPpsxWMvF+E=",
"id"=>"prueba2",
"project"=>{"name"=>"prueba4",
"issue_custom_field_ids"=>["48",
"49",
"53",
""],
"custom_field_values"=>{"44"=>"Número de albarán EST",
"45"=>"Número de albarán VAR",
"46"=>"Ubicación",
"47"=>"Dirección de la obra",
"50"=>"Número de albarán SOFT",
"51"=>"Número de albarán HARD",
"41"=>"Delegación",
"42"=>"Número de la obra",
"43"=>"Número de albarán ROB"},
"tracker_ids"=>["2",
"1",
"3",
"5",
"6",
"7",
"8",
"9",
""],
"parent_id"=>"",
"homepage"=>"",
"description"=>"Descripción del proyecto de operaciones",
"is_public"=>"0",
"identifier"=>"prueba4",
"enabled_module_names"=>["issue_tracking",
"time_tracking",
"news",
"documents",
"files",
"wiki",
"repository",
"boards",
"calendar",
"gantt",
"budget_module",
"customer_module",
"ezfaq",
"redmine_blocks",
"charts",
"wiki_extensions",
""]}}
Show session dump
Response
Headers:
{"Content-Type"=>"",
"Cache-Control"=>"no-cache"}
If I use the same database with aptana and with the debugger and I try to copy the same project redmine don't returns any error...
Ithink it