Project

General

Profile

Actions

Defect #26085

open

Subtasks are not assigning to correct parent

Added by Mark Wintch almost 7 years ago. Updated over 6 years ago.

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

0%

Estimated time:
Resolution:
Affected version:

Description

To replicate the issue one needs to:
  • 1. Create a level 1 issue. This will be the parent of all other issues. Let's call it Issue #100
  • 2. Then create any number greater than 1 subtasks of that parent. We will create five and say they are issue ID's 110, 120, 130, 140, and 150.
  • 3. Now under issue ID create a subtask with issue ID 111. That will work fine.
  • Here comes the problem:
  • 4. Move 111 to 150 and it will be abandoned.
  • 5. Move 111 to 140 and it will say 140 is the parent, but it will actually be placed under 150.

Looking at the issues table in SQL the problem seems to be that the lft and rgt fields do not increment when adding the new subtask to a new parent that did not have tasks previously. So, the new task fails over to the next available range of lft rgt bounds. If there is no parent to that range then the issue is orphaned, otherwise it assigns the issue to the next range available, but not the one that the user desires even though the application will say the tasks is a child of the correct parent.


Our current workaround is as follows using the example from above:
Edit issue 140 or 150 whichever you are working with as follows. Remove the parent of 100 and set it to blank and save. Then edit issue 111 so that it has no parent and save it. Go back to issue 140 or 150 and set the parent to 100 and save it. Then go to issue 111 and assign to either 140 or 150 and it will now work.

Environment:
  Redmine version                3.3.0.stable
  Ruby version                   2.1.8-p440 (2015-12-16) [x64-mingw32]
  Rails version                  4.2.6
  Environment                    production
  Database adapter               SQLServer
SCM:
  Filesystem
Redmine plugins:
  redmine_agile                  1.4.1

Files

2017-12-05 04.43.26 pm.jpg (491 KB) 2017-12-05 04.43.26 pm.jpg Vitaly Maslov, 2017-12-05 12:56
2017-12-05 04.44.28 pm.jpg (491 KB) 2017-12-05 04.44.28 pm.jpg Vitaly Maslov, 2017-12-05 12:56
2017-12-05 04.46.47 pm.jpg (119 KB) 2017-12-05 04.46.47 pm.jpg Vitaly Maslov, 2017-12-05 12:56
2017-12-05 04.46.13 pm.jpg (504 KB) 2017-12-05 04.46.13 pm.jpg Vitaly Maslov, 2017-12-05 12:56
after.png (13.6 KB) after.png Toshi MARUYAMA, 2017-12-28 17:59
before.png (13.9 KB) before.png Toshi MARUYAMA, 2017-12-28 17:59
Actions

Also available in: Atom PDF