This repository was archived by the owner on Apr 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
This repository was archived by the owner on Apr 10, 2023. It is now read-only.
Broken issue copy functionality #228
Copy link
Copy link
Open
Description
When an issue with children is copied, the parent-child relation is lost.
Steps to reproduce:
- Install
redmine_tags
- Create issue A with child issue B
- Use "Copy" on issue A and submit
- New issues A2 and B2 are created, but A2 is not a parent of B2
This issue is also detected by two of core Redmine tests:
-
Error: IssuesControllerTest#test_create_as_copy_to_a_different_project_should_copy_subtask_custom_fields: ActiveRecord::StaleObjectError: Attempted to update a stale object: Issue. app/models/issue.rb:222:in `create_or_update' plugins/redmine_tags/lib/redmine_tags/hooks/model_issue_hook.rb:18:in `controller_issues_new_after_save' lib/redmine/hook.rb:66:in `block (2 levels) in call_hook' lib/redmine/hook.rb:66:in `each' lib/redmine/hook.rb:66:in `block in call_hook' lib/redmine/hook.rb:63:in `tap' lib/redmine/hook.rb:63:in `call_hook' lib/redmine/hook.rb:96:in `call_hook' app/controllers/issues_controller.rb:150:in `create' lib/redmine/sudo_mode.rb:61:in `sudo_mode' test/functional/issues_controller_test.rb:5383:in `block in test_create_as_copy_to_a_different_project_should_copy_subtask_custom_fields' test/functional/issues_controller_test.rb:5382:in `test_create_as_copy_to_a_different_project_should_copy_subtask_custom_fields' bin/rails test test/functional/issues_controller_test.rb:5378
-
Error: IssuesControllerTest#test_create_as_copy_should_copy_subtasks: ActiveRecord::StaleObjectError: Attempted to update a stale object: Issue. app/models/issue.rb:222:in `create_or_update' plugins/redmine_tags/lib/redmine_tags/hooks/model_issue_hook.rb:18:in `controller_issues_new_after_save' lib/redmine/hook.rb:66:in `block (2 levels) in call_hook' lib/redmine/hook.rb:66:in `each' lib/redmine/hook.rb:66:in `block in call_hook' lib/redmine/hook.rb:63:in `tap' lib/redmine/hook.rb:63:in `call_hook' lib/redmine/hook.rb:96:in `call_hook' app/controllers/issues_controller.rb:150:in `create' lib/redmine/sudo_mode.rb:61:in `sudo_mode' test/functional/issues_controller_test.rb:5358:in `block in test_create_as_copy_should_copy_subtasks' test/functional/issues_controller_test.rb:5357:in `test_create_as_copy_should_copy_subtasks' bin/rails test test/functional/issues_controller_test.rb:5353
Metadata
Metadata
Assignees
Labels
No labels