Project

General

Profile

Actions

Defect #28240

open

Issue parents are getting set incorrectly

Added by Tomoko Shimizu over 6 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

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

Related issues

Related to Redmine - Defect #27066: issue parents is wrongClosed

Actions
Actions #1

Updated by Tomoko Shimizu over 6 years ago

Actions #2

Updated by Mischa The Evil over 6 years ago

Actions #3

Updated by Mischa The Evil over 6 years ago

Actions #4

Updated by Mischa The Evil over 6 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 How to request help for some pointers.

Actions #5

Updated by Tomoko Shimizu over 6 years ago

Affected version is 3.3.0 (not 3.2), sorry I was wrong.

Environment:
Redmine version 3.3.0.stable
Ruby version 2.3.1-p112 (2016-04-26) [x86_64-linux]
Rails version 4.2.6
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.13
Filesystem
Redmine plugins:
clipboard_image_paste 1.10
notify_custom_users 1.0.2
project_overview 1.2.0
redmine_absolute_dates 0.0.2
redmine_backlogs v1.0.6
redmine_banner 0.1.1
redmine_code_review 0.7.0
redmine_diff_email 0.0.5

Actions #6

Updated by Tomoko Shimizu over 6 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.

The recent change about "def update_nested_set_attributes" and "def update_nested_set_attributes_on_parent_change" is only following one.
Merged rails-5.1 branch (#23630). r16859.

This change looks different purpose.
http://www.redmine.org/projects/redmine/repository/revisions/16859/diff/trunk/app/models/issue.rb

Actions

Also available in: Atom PDF