https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292013-04-04T09:22:53ZRedmineRedmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=478362013-04-04T09:22:53ZToshi MARUYAMA
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/47836/diff?detail_id=35071">diff</a>)</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=484542013-04-12T11:15:33ZStanislav German-Evtushenko
<ul></ul><p>Same to me</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=485002013-04-13T07:42:22ZToshi MARUYAMA
<ul><li><strong>Subject</strong> changed from <i>can't make connected issues into subtasks</i> to <i>can't make related issues into subtasks</i></li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=487782013-04-19T20:22:45ZMauro Bender
<ul></ul><p>Same here. I would like to have this feature, it seems really useful for me.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=491422013-05-06T16:05:52ZRalf S.
<ul></ul><ins>Comment:</ins>
<ul>
<li>+1 Same for us, this was working well >2.3.0 </li>
<li>we updated from V2.3.0 to V2.3.1 to solve this problem (and <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Circular loop testing prevents precedes/follows relation between subtasks (Closed)" href="https://www.redmine.org/issues/13586">#13586</a>)</li>
<li>moving subtasks to another main task is a common usecase for us</li>
</ul>
<ins>Workaround Details:</ins>
<ul>
<li>in V2.3.0 it <ins>was</ins> possible to workaround by 1. clearing the parant-task and than setting the new parent task</li>
<li>but V2.3.1 seems to make the bug more serious, the workaround doesn't work any more (always "Parent task is invalid")</li>
</ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=493182013-05-10T11:36:03ZMischa The Evil
<ul><li><strong>Subject</strong> changed from <i>can't make related issues into subtasks</i> to <i>Can't set parent issue when issue relations among child issues are present</i></li></ul><p>The problem seems to come up when issue relations are in place <em>while</em> trying to establish a parent-child construction by changing the parent issue field value of the child-to-be issue. If the parent-child construction is set first, issue relations among child issues can be configured flawlessly.<br />Note: this only applies to issue relations among child-issues; relations between the parent and its child(s) is not supported (and has never been supported).</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=499732013-06-10T11:15:10ZJonathan Tee
<ul></ul><p>with patch from <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Ruby hangs when adding a subtask (Closed)" href="https://www.redmine.org/issues/14015">#14015</a> it is possible to set parent issue again, but icons are not displayed correctly, see <a class="external" href="http://www.redmine.org/issues/14015#note-7">http://www.redmine.org/issues/14015#note-7</a></p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=501282013-06-19T14:41:17ZJonathan Tee
<ul></ul><p>forget my notes about missing icons. Now i've learned that icons are only displayed if the parent issue is above the issue. So if i sort on 'parent id' my parent issue is the first and all my sub issues are displayed with icons :-)</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=515092013-09-02T05:37:00ZIlyas Makashev
<ul></ul><p>same here. For examle, I have tasks 1, 2, 3. 2 is child of 1, 2 is related to 3. When I try to move 3 to 1 as child, it says "Parent task is invalid". After removing relationship between 2 and 3, it works.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=515372013-09-03T04:35:00ZIlyas Makashev
<ul></ul><p>the problem seems to appear in line 579 of issue.rb. As I understand it's not a bug, but feature.<br />There is a function all_dependent_issues, which constructs array with all childs of issue we move and related to them issues. If the target parent issue appears in that array by some way (I think through related issues), error is thrown.<br />If we do not add related issues to all_dependent_issues, everything works just fine (to do that comment lines 923-936 in issue.rb). <br />I can missing something, but why we add related issues to all_dependent_issues? I don't see any logic of that.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=518602013-09-17T19:06:38ZFelix Schäfer
<ul></ul><p>We're (<a href="http://plan.io" class="external">Planio</a>) also seeing this problem, it's very strange because you can remove the relationship between the future siblings, make 2 issues siblings and re-add the relationship between the 2 siblings afterward.</p>
<p>Is there any way we can help with this or speed up things in any way?</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=518852013-09-18T19:53:38ZBruno Medeiros
<ul></ul><p>Same problem here. A blocks B, and if I try to set A and B parent to C, I got an error: "Parent task is invalid" <br />As Felix said, the only workaround is to remove the issues relations and re-add them, which could be very painful.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=519002013-09-19T12:56:26ZEtienne Massip
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul><p>Confirmed, happens when setting a parent</p>
<ol>
<li>to an issue which has a relation to an issue which has a parent</li>
<li>because of 1. and the fact that the parent issue is set to each one by one, to issues which already have mutual relations</li>
</ol> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=527152013-10-21T12:41:54ZFelix Schäfer
<ul></ul><p>I don't understand the <code>Issue#all_dependent_issues</code> method or where it's used well enough yet, so this has to be taken to a grain of salt, but removing the line <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/12213/entry/branches/2.3-stable/app/models/issue.rb#L903">source:/branches/2.3-stable/app/models/issue.rb@12213#L903</a> solves this problem. Be aware though: This is untested for everything else, so I can't say what other repercussions this has on other functions of Redmine.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=527882013-10-25T05:21:11ZToru Haraguchi
<ul></ul><p>+1<br />Here same issue arises which did not while we were using 2.2.x. <br />If <code>all_dependent_issues(except)</code> is universal as intended, <code>except</code> argument may be not provided correctly at usage. And probably, <code>all_dependent_issues(except)</code> should be called multiple times with different <code>except</code> s.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=534502013-11-29T05:29:58ZIlyas Makashev
<ul></ul><p>Issue#all_dependent_issues seems to be too complicated and unreasonable (and also it slows down the performance when creating or updating issues). This algorythm defines dependent issues term and says that it consists of parent, child and related issues of particular issue. In fact we shouldn't consider related issues as dependent issues.</p>
<p>Let's say we want B to make as child to A. The only checking we should do is to ensure that B doesn't already belong to the children tree of A and B doesn't have A in its own children tree. In fact this point is very different to issue relationships.</p>
<p>So I am definitely sure that we should remove from Issue#all_dependent_issues algorithm the lines deal with issue relationships. These lines are 926-940 in <a class="external" href="http://www.redmine.org/projects/redmine/repository/revisions/12213/entry/branches/2.3-stable/app/models/issue.rb">http://www.redmine.org/projects/redmine/repository/revisions/12213/entry/branches/2.3-stable/app/models/issue.rb</a>. As i tested it seems to break nothing.</p>
<p>Also we may need to rewrite a bit this function because there will be no use of some logic and constants anymore.</p>
<p>I you need any help I can prepare patch.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=540832014-01-02T09:36:36ZAdrien Crivelli
<ul></ul><p>Also confirm the behavior, removing relationship, adding parent, and re-creating relationship is a possible workaround for the time being. But that may send lots of undesired email notifications.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=544542014-01-23T10:00:42ZPierre Pretorius
<ul></ul><p>I'm running Redmine 2.3.1.stable. We experience this issue as well.</p>
<p><strong>This workaround doesn't work</strong><br />1) Remove any existing parent then save.<br />2) Add the new parent.</p>
<p><strong>This workaround works</strong><br />1) Remove any existing parent and related tasks.<br />2) Add the new parent and related tasks removed in step 1.</p>
<p>Additionally last week our server went into an infinite loop. Ruby processes maxed at 100% cpu and doesn't respond to new requests. This is probably related issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Ruby hangs when adding a subtask (Closed)" href="https://www.redmine.org/issues/14015">#14015</a> or <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Circular loop testing prevents precedes/follows relation between subtasks (Closed)" href="https://www.redmine.org/issues/13586">#13586</a> which has been fixed in 2.3.2.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=553092014-03-14T07:35:14ZMaxime Vez
<ul></ul><p>With Redmine 2.4, I also experience this bug. Workaround : first remove the related tasks, put them under the same parent, then add again the relation between the brother tasks.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=560692014-04-25T11:42:14ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/15599">Defect #15599</a>: tickets that are related to each other block a declaration of parent task for them (error: invalid task)</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=560722014-04-25T13:06:37ZDiego Tiemann
<ul></ul><p>Same here, in Redmine Version 2.5. I would like to have this feature, it seems really useful for me.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=565782014-06-02T04:05:55ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/15320">Defect #15320</a>: Changing Child's Parent Ticket Field To Parent's Parent fails.</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=572722014-07-03T03:41:36ZYas UCHIDA
<ul></ul><p>With Redmine 2.5.1, I also experience this bug. I would like to have this feature, it seems really useful for me.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=573832014-07-07T20:15:22ZWilliam Roush
<ul></ul><p>Pierre Pretorius wrote:</p>
<blockquote>
<p>1) Remove any existing parent and related tasks.</p>
</blockquote>
<p>Ouch, ever since we got history on adding/removing related tasks, having to do things like this to fix relationship issues gets <em>very</em> noisy. :(</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=588562014-09-26T09:10:42ZEtienne Rossignon
<ul></ul><p>Those defects <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Can't set parent issue when issue relations among child issues are present (Closed)" href="https://www.redmine.org/issues/13654">#13654</a> and <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Changing Child's Parent Ticket Field To Parent's Parent fails. (Closed)" href="https://www.redmine.org/issues/15320">#15320</a> are really annoying and prevents us to rearrange a hierarchie of issues. (we are using 2.4.1)<br />As stated above I am not sure that the piece of code that prevent creation of cycles should care about "linked issues" but only about parent-child relationships.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=589242014-10-01T10:10:25ZIsmael Barros²
<ul></ul><p>This issue is still reproducible in 2.5.2.stable; it's a pretty big show-stopper.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=590752014-10-10T07:52:07ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-5 priority-high2 closed" href="/issues/17845">Defect #17845</a>: Assigning parent task fails when a related issue is yet a sub issue of the new parent task</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=591052014-10-13T09:35:46ZLaurent Girard
<ul></ul><p>+1</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=591322014-10-14T20:37:47ZDeoren Moor
<ul></ul><p>+1</p>
<p>I got bit by this again today. My workaround for similar situations when Redmine won't let me relate ticket A to ticket B is to relate B to A. However since I was trying to change parent tickets I had to nuke all relations, and then "reparent" the ticket (as others have already said). I did not bother trying to add the relations back when I was done.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=592752014-10-21T10:40:16ZRobert Korulczyk
<ul></ul><p>+1</p>
<p>Confirmed in Redmine 2.5.2.stable.13466. Really annoying.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=594252014-10-27T12:19:04ZDzianis Frydliand
<ul></ul><p>+1</p>
<p>Confirmed in Redmine 2.5.2</p>
<p>Please fix it!</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=594792014-10-29T18:57:21ZMikhail Barg
<ul></ul><p>+1!</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=598772014-11-19T10:00:02ZRoger Griffiths
<ul></ul><p>Etienne Rossignon wrote:</p>
<blockquote>
<p>Those defects <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Can't set parent issue when issue relations among child issues are present (Closed)" href="https://www.redmine.org/issues/13654">#13654</a> and <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Changing Child's Parent Ticket Field To Parent's Parent fails. (Closed)" href="https://www.redmine.org/issues/15320">#15320</a> are really annoying and prevents us to rearrange a hierarchie of issues. (we are using 2.4.1)<br />As stated above I am not sure that the piece of code that prevent creation of cycles should care about "linked issues" but only about parent-child relationships.</p>
</blockquote>
I agree that this should be resolved but some types of "linked issue" relationships do matter where cycles are concerned:-
<ul>
<li>Duplicates/Duplicated By</li>
<li>Blocks/Blocked By</li>
<li>Precedes/Follows</li>
<li>Copied To/Copied From</li>
</ul>
<p>Only the "Related To" linkage (which is symmetrical) should notionally ignore cycles and arguably the cycles should be managed on a per relationship type basis.</p>
<p>Parent-Child relationships are a traditional WBS structure feature and the Blocks/Blocked By and Precedes/Follows relationships are traditional scheduling relationships (the two should not interfere with each other).</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=600032014-11-25T19:55:28Z@ go2null
<ul></ul><p>Roger Griffiths wrote:</p>
<blockquote>
I agree that this should be resolved but some types of "linked issue" relationships do matter where cycles are concerned:-
<ul>
<li>Duplicates/Duplicated By</li>
<li>Blocks/Blocked By</li>
<li>Precedes/Follows</li>
<li>Copied To/Copied From</li>
</ul>
<p>Only the "Related To" linkage (which is symmetrical) should notionally ignore cycles and arguably the cycles should be managed on a per relationship type basis.</p>
<p>Parent-Child relationships are a traditional WBS structure feature and the Blocks/Blocked By and Precedes/Follows relationships are traditional scheduling relationships (the two should not interfere with each other).</p>
</blockquote>
<p>Any reason why <code>Duplicates/Duplicated By</code> and <code>Copied To/Copied From</code> should be considered as forming a hierarchy?</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=609922015-01-20T04:07:52ZMischa The Evil
<ul></ul><p>@ go2null wrote:</p>
<blockquote>
<p>Roger Griffiths wrote:</p>
<blockquote>
<p>...</p>
</blockquote>
<p>Any reason why <code>Duplicates/Duplicated By</code> and <code>Copied To/Copied From</code> should be considered as forming a hierarchy?</p>
</blockquote>
They are both tied to specific issue actions:
<ul>
<li><code>Duplicates/Duplicated By</code> relation: enforces the auto-closure of duplicates when the duplicated issue is being closed.</li>
<li><code>Copied To/Copied From</code>: this relation is <em>always added automatically</em> when copying an issue (until <a class="changeset" title="Configurable behavour for linking issues on copy (#18500)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13668">r13668</a>, <a class="version" href="https://www.redmine.org/versions/80">3.0.0</a>; nevertheless, since issue copy is implemented as "old issue [Copy-action] issue new form + pre-filled properties (which can be manually changed) > new issue" issue copied to will logically always <em>follow out of</em> issue copied from (not taking manual relation changes into account here)).</li>
</ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=610202015-01-21T05:59:14ZMischa The Evil
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/18403">Defect #18403</a>: Can't change parent task if an issue has some relations</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=616232015-02-19T14:20:22ZAlexander Morozov
<ul></ul><p>+1<br />Fix please!</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=616562015-02-20T20:39:43ZOmer Arslan
<ul></ul><p>+1 - will be very useful</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=626072015-03-28T03:58:34ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/19406">Defect #19406</a>: Cannot set multiple "tasks with precedes/follows relationship" to *all* become child-tasks of some parent</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=644132015-06-23T17:50:15ZDirk Hoffmann
<ul></ul><p>It is frustrating to see that this is still on priority "Normal" after two years of discussions and many duplicate reports.</p>
<p>It even seems that it is a regression (around 2.3.0/2.3.1), so it should receive some significant attention from developers.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=644212015-06-24T05:02:37ZFlorian S.
<ul></ul><p>+1 - This bug is really annoying since two years now...</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=644222015-06-24T08:54:53ZRafael Gómez García
<ul></ul><p>Florian S. wrote:</p>
<blockquote>
<p>+1 - This bug is really annoying since two years now...</p>
</blockquote> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=651352015-07-28T12:25:53ZJaromír Rys
<ul></ul><p>+1</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=660622015-09-16T14:40:33ZFernando Hartmann
<ul></ul><p>+1 This bug really disturbs many of my users.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=665372015-10-08T10:10:43ZMartin Hartung
<ul></ul><p>+1 (because the reason is really unlogic and not recognizable)</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=666302015-10-14T02:51:40ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/20750">Defect #20750</a>: linking a copied issue to a superordinate ticket does not work</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=666322015-10-14T02:51:59ZToshi MARUYAMA
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/20750">Defect #20750</a>: linking a copied issue to a superordinate ticket does not work</i>)</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=666342015-10-14T02:52:09ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/20750">Defect #20750</a>: linking a copied issue to a superordinate ticket does not work</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=668742015-10-26T15:22:18ZThomas Steinert
<ul></ul><p>+1 with Redmine 2.6.1</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=669162015-10-28T17:48:34Z@ go2null
<ul></ul><p>Mischa The Evil wrote:</p>
<blockquote>
<p>@ go2null wrote:</p>
<blockquote>
<p>Roger Griffiths wrote:</p>
<blockquote>
<p>...</p>
</blockquote>
<p>Any reason why <code>Duplicates/Duplicated By</code> and <code>Copied To/Copied From</code> should be considered as forming a hierarchy?</p>
</blockquote>
They are both tied to specific issue actions:
<ul>
<li><code>Duplicates/Duplicated By</code> relation: enforces the auto-closure of duplicates when the duplicated issue is being closed.</li>
<li><code>Copied To/Copied From</code>: this relation is <em>always added automatically</em> when copying an issue (until <a class="changeset" title="Configurable behavour for linking issues on copy (#18500)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13668">r13668</a>, <a class="version" href="https://www.redmine.org/versions/80">3.0.0</a>; nevertheless, since issue copy is implemented as "old issue [Copy-action] issue new form + pre-filled properties (which can be manually changed) > new issue" issue copied to will logically always <em>follow out of</em> issue copied from (not taking manual relation changes into account here)).</li>
</ul>
</blockquote>
<p><code>Duplicates/Duplicated By</code>: OK.<br /><code>Copied To/Copied From</code>: I've had users copy an issue to make the copy the parent (as the <em>copy from</em> has children already), only to find out that they cannot.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=670522015-11-03T18:47:41ZRoman Pickl
<ul></ul><p>+1</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=671022015-11-05T10:52:07ZJean Louis
<ul></ul><p>+1</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=672382015-11-10T12:20:23ZNils Grimm
<ul></ul><p>+1, confirmed in redmine 3.1.1.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=673822015-11-19T05:12:43ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/17580">Defect #17580</a>: After copying a task, setting the parent as the orignal task's parent triggers an error</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=675402015-11-26T16:41:06ZKirill Marchuk
<ul></ul><p>Hi all!</p>
<p>I believe that "all_dependent_issues" is not-so-well defined method.</p>
<p>I see that it includes children as dependent, while (as far as I understand) quite the opposite is true: parent task depends on it's children, and not vice versa. This basically follows out of assumption, that you cannot close (or solve) Parent task, until you have all the Children closed (or solved).</p>
<p>Am I wrong ? Can anyone comment on this ?</p>
<p>I would suggest to re-define (and re-implement) this method to return only <strong>really</strong> dependent issues - i.e., issues that cannot be closed or solved until you close or solve the issue in question (at least, concerning "parenthood", but normally it should also make distinction between dependency-neutral relations like "related" and dependency-critical relations like "blocked").</p>
<p>Any objections ? I would be happy to hear what the experts think about this.</p>
<p>Thanks a lot.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=675442015-11-27T05:44:21ZKirill Marchuk
<ul></ul><p>I propose to define a method "all_blocking_and_preceding_issues (issue)", that would return a collection of issues, by building a queue of:</p>
<p>- issue in question;<br />- issues, that have either "blocking" or "preceding" relation with any issue in the queue;<br />- issues, that are children of any issue in the queue.</p>
<p>(repeat building the queue until we cannot add any issue to the queue)</p>
<p>and the only check, that we have to have while adding a parent P to issue S, should be: make sure that P is not in 'all_blocking_and_preceding_issues (S)' (because that would create "closed dependency loop". All the other dependency checks are not relevant here.</p>
<p>Would be great to hear from the maintainers - is this acceptable approach ? I want to implement patch on this, but would be great to have a support from the experts.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=675852015-11-29T13:12:48ZKirill Marchuk
<ul></ul><p>There's unit test in "test/unit/issue_test.rb" called "test_setting_parent_to_a_dependent_issue_should_not_validate"</p>
<p>In this test, issue3 precedes issue1 and issue1 precedes issue2; and then issue2 is attempted to be set as a parent of issue3. The expected behaviour in a test is to FAIL this attempt.</p>
<p>As far I understand, there should be nothing wrong with issue3 preceding issue2 AND being a child of issue2; apparently, the test authors thought different about that.</p>
<p>May I ask what's the logic behind this test ? I see that it was added here (<a class="external" href="http://www.redmine.org/projects/redmine/repository/revisions/11641/diff/trunk/test/unit/issue_test.rb">http://www.redmine.org/projects/redmine/repository/revisions/11641/diff/trunk/test/unit/issue_test.rb</a>), although I don't exactly understand a point of test_setting_parent_to_a_dependent_issue_should_not_validate; test_setting_parent_should_not_allow_circular_dependency seems sufficient to mitigate the issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Circular loop when using relations and subtasks (Closed)" href="https://www.redmine.org/issues/8794">#8794</a></p>
<p>Please correct me if I am wrong on this</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=676692015-12-05T15:13:51ZKirill Marchuk
<ul></ul><p>I want to suggest a patch for review; but the failing "test_setting_parent_to_a_dependent_issue_should_not_validate" test stops me from that.</p>
<p>the very point of my patch (as it should help solve the problem we're discussing here) is to ALLOW (incl. transient) non-blocking relationships between to-be-parent and to-be-child issues. The only case when setting P as parent to issue S should fail, is when P already BLOCKS or PRECEDES S (directly or transiently)</p>
<p>May I include removal or refactoring of test "test_setting_parent_to_a_dependent_issue_should_not_validate" in a patch ? Or what else should I do ?</p>
<p>Any suggestions are welcome.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=676932015-12-06T14:05:46ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Kirill Marchuk wrote:</p>
<blockquote>
<p>May I include removal or refactoring of test "test_setting_parent_to_a_dependent_issue_should_not_validate" in a patch ?</p>
</blockquote>
<p>Yes, that would be fine.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=677672015-12-09T17:22:44ZKirill Marchuk
<ul><li><strong>File</strong> <a href="/attachments/14811">defect-13654.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14811/defect-13654.diff">defect-13654.diff</a> added</li></ul><p>Sorry for the delay.</p>
<p>OK, so here's the proposed patch. I've tested the case, described in the Defect, and the problem no longer occurs. Although I definitely did not check all the possible cases.</p>
<p>All the "issue_test.rb" tests are successful with this patch; although I had to change one of them (see above). Also I've added one-line comments for 2 of the test-cases - I think it will be easier for the contributors to see, why is this test here.</p>
<p>Looking forward for your feedback!</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=677832015-12-10T05:02:33ZKirill Marchuk
<ul></ul><p>Yesterday, when I've proposed a patch, "rake test" was still running (it's all too slow on my machine), so I attached the patch before all the test were run.</p>
<p>At the end of it, it had 1 failure, something like "IssueNestedCollectionSet"</p>
<p>It was too late to investigate, and I will try to try it on master today.</p>
<p>Just FYI</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=678352015-12-11T17:33:49ZKirill Marchuk
<ul></ul><p>Looks like the same happens with "master" on my machine: </p>
<pre><code>1) Failure:<br />IssueNestedSetConcurrencyTest#test_concurrency [test/unit/issue_nested_set_concurrency_test.rb:45]:<br />Expected "Mysql2::Error: Deadlock found when trying to get lock; try restarting transaction: SELECT `issues`.`id` FROM `issues` WHERE (root_id IN (SELECT root_id FROM issues WHERE id IN (1031,1028))) ORDER BY `issues`.`id` ASC FOR UPDATE" to be nil.</code></pre>
<pre><code>2) Failure:<br />IssueNestedSetConcurrencyTest#test_concurrent_subtasks_creation [test/unit/issue_nested_set_concurrency_test.rb:61]:<br />Expected "Mysql2::Error: Deadlock found when trying to get lock; try restarting transaction: SELECT `issues`.`id` FROM `issues` WHERE (root_id IN (SELECT root_id FROM issues WHERE id IN (1037))) ORDER BY `issues`.`id` ASC FOR UPDATE" to be nil.</code></pre>
<p>2 runs, 3 assertions, 2 failures, 0 errors, 0 skips</p>
<p>I have no ideas what to do with it, but I have a humble hope that this has nothing to do with my changes (as long as it's on master), so I would ask to review my patch and somehow push this process further..</p>
<p>I am pretty sure there're problems with coding style and other things, so I am ready to process this feedback</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=679932015-12-17T03:13:16ZKirill Marchuk
<ul></ul><p>Hi all</p>
<p>Is there any timeline regarding patch review, or any other feedback ?</p>
<p>Thanks</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=681782015-12-30T10:28:54ZKirill Marchuk
<ul></ul><p>Happy New Year everyone !</p>
<p>I hope in 2016 the patch will be reviewed.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=682552016-01-05T08:16:24ZGo MAEDA
<ul></ul><p>Kirill Marchuk's patch works fine for me.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=683862016-01-09T11:19:36ZToshi MARUYAMA
<ul></ul><p>Kirill Marchuk wrote:</p>
<blockquote>
<p>Looks like the same happens with "master" on my machine:</p>
<p>1) Failure:<br />IssueNestedSetConcurrencyTest#test_concurrency [test/unit/issue_nested_set_concurrency_test.rb:45]:<br />Expected "Mysql2::Error: Deadlock found when trying to get lock; try restarting transaction: SELECT `issues`.`id` FROM `issues` WHERE (root_id IN (SELECT root_id FROM issues WHERE id IN (1031,1028))) ORDER BY `issues`.`id` ASC FOR UPDATE" to be nil.</p>
<p>2) Failure:<br />IssueNestedSetConcurrencyTest#test_concurrent_subtasks_creation [test/unit/issue_nested_set_concurrency_test.rb:61]:<br />Expected "Mysql2::Error: Deadlock found when trying to get lock; try restarting transaction: SELECT `issues`.`id` FROM `issues` WHERE (root_id IN (SELECT root_id FROM issues WHERE id IN (1037))) ORDER BY `issues`.`id` ASC FOR UPDATE" to be nil.</p>
<p>2 runs, 3 assertions, 2 failures, 0 errors, 0 skips</p>
</blockquote>
<p>Due to <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: MySQL 5.6: IssueNestedSetConcurrencyTest#test_concurrency : always fails (Closed)" href="https://www.redmine.org/issues/19344">#19344</a>.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=683882016-01-09T11:21:05ZToshi MARUYAMA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next minor release</i> to <i>3.3.0</i></li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=684262016-01-10T15:18:21ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>This is fixed by <a class="changeset" title="Can't set parent issue when issue relations among child issues are present (#13654)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/15056">r15056</a>. Tests were added for the use cases reported here.</p>
<p>What differs from the proposed pacth is that blocks/blocked by relations are now totally independant of parent/subtasks relations as Redmine does not block the closing of parent issues in any way.</p>
<p>And it was important to keep #test_setting_parent_to_a_dependent_issue_should_not_validate as is for the reasons now explained in comments. It was failing with the proposed change.</p>
<p>Kirill, thanks for your help in fixing this issue.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=685242016-01-13T05:04:44ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/8628">Defect #8628</a>: "Related to" reference may yield circular dependency error message</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=686292016-01-17T01:16:40ZGo MAEDA
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/15320">Defect #15320</a>: Changing Child's Parent Ticket Field To Parent's Parent fails.</i>)</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=686322016-01-17T01:16:50ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/15320">Defect #15320</a>: Changing Child's Parent Ticket Field To Parent's Parent fails.</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=686382016-01-17T02:42:05ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/19627">Defect #19627</a>: Cannot set task.Parent = Grandparent</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=687162016-01-19T06:31:59ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/21758">Defect #21758</a>: Cannot specify parent task if has linked related issue</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=691932016-02-12T03:19:38ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/21558">Defect #21558</a>: The issue parent has in most caes to be deleted before assigning a new parent.</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=706932016-05-04T12:37:42ZThomas Koch
<ul></ul><p>The Problem still exists with Redmine 3.2.0.stable.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=706942016-05-04T12:43:29ZMatteo Steccolini
<ul></ul><p>Thomas Koch wrote:</p>
<blockquote>
<p>The Problem still exists with Redmine 3.2.0.stable.</p>
</blockquote>
<p>The target revision appears to be 3.3.0.</p> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=749782016-12-11T07:57:13ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" href="/issues/22774">Defect #22774</a>: "Parent task is invalid" message when setting parent to root issue after setting to a child of the root.</i> added</li></ul> Redmine - Defect #13654: Can't set parent issue when issue relations among child issues are presenthttps://www.redmine.org/issues/13654?journal_id=770842017-03-04T03:47:15ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/25137">Defect #25137</a>: Assigning a parent in issue properties does not work (Error "Parent task is invalid") although the Parent exists</i> added</li></ul>