Issue parents are getting set incorrectly
It is same as Defect #27066.
When adding and saving a sub issue under a parent issue, the subtask appear under wrong parent.
In our Redmine environment, this occurs pretty often for some root_id issues have over 100 decendent issues.
We recently start running "Issues#rebuild_tree!" once a month at midnight.
But "once a month" is not enough.
"Issues#rebuild_tree!" takes over 5 hours and lockes all issues meanwhile. So running this script every day is not good.
'Issue.rebuild_single_tree!(1)' needs manual operation by redmine admins at daytime.
So preventing "issue parents is wrong(="lft" and "rgt" values of issues become wrong.)" from happening would be much better.Environment
- Redmine 3.2
- Rails 4
- Ruby 2.3
- Issue number:about 400000
#4 Updated by Mischa The Evil over 3 years ago
- Tracker changed from Feature to Defect
- Subject changed from issue parents is wrong to Issue parents are getting set incorrectly
- Category set to Issues
- Affected version set to 3.2.0
Tomoko Shimizu wrote:
- Redmine 3.2
I'd first suggest to update to the current release branch, 3.4.x. As Toshi and Randa both pointed out in #27066, recent release might have changed things in order to fix/mitigate the issue.
Additionally, are you using any plugins? See submissions and for some pointers.
#5 Updated by Tomoko Shimizu over 3 years ago
Affected version is 3.3.0 (not 3.2), sorry I was wrong.
Redmine version 3.3.0.stable
Ruby version 2.3.1-p112 (2016-04-26) [x86_64-linux]
Rails version 4.2.6
Database adapter Mysql2
#6 Updated by Tomoko Shimizu over 3 years ago
Thank you Mischa.
I would version up our Redmine Environment to the latest verion.
I have thought "def update_nested_set_attributes" and "def update_nested_set_attributes_on_parent_change" in "app/models/issue.rb" are related to this defect, and If both defs are done under same DB trunsaction , the defect might be fixed.
This change looks different purpose.