"Related to" reference may yield circular dependency error message
|Assignee:||Jean-Philippe Lang||% Done:|
The "related to" reference is neither directed nor declaring a dependency. Thus the error "This relation would create a circular dependency" seems wrong. "Related to" references should be possible in any case, should they not?
#3 Updated by Christian Zagrodnick over 9 years ago
Victor Engmark wrote:
"Related to" is reciprocal to itself. In other words, when such a relation is created, there should be a link from both issues to the other one of the relation.
That is the case but you could still want to build larger circles A -> B -> C -> A.
#4 Updated by Fares Abdullah over 9 years ago
I had the same problem -
In my case I had an issue, A. I created issue B and set it as related to A. Then I found that B was a duplicate of an existing issue, C, that someone else had created.
I marked B as a duplicate of C, and wanted to relate A to C, and got the "circular dependency" error. I had to manually go and delete the relation between A and B to be able to relate A to C, even though it should not be necessary.
"related to" should allow many different issues related together, as it is not a "dependency".
Cheers and thanks for the great application!
#8 Updated by Robin McKenzie about 8 years ago
+1 "related to" isn't a dependency.
Having the same problem, since we upgraded to the latest version of Redmine.
I've had to advise all our devs to stop using the Related Issues functionality, as this is preventing us setting up tickets with parent/child relationships.
e.g. Create a parent ticket, and two child tickets of this. Attempt to relate the two child tickets - "This relation would create a circular dependency".
Alternatively, create two tickets and relate them to each other. Create another ticket, and then set child A to have this as its parent. Attempt to set child B to have the same parent - "Parent task is invalid".
Would it be possible to get a fix for this prioritised?
#14 Updated by Egbert van der Wal about 7 years ago
- File fix_issue_relations.diff added
How can this still be open when it's such a simple fix?
I applied the attached patch to my Redmine SVN checkout to fix this. Feel free to merge it in. It basically takes the type of relations into account when traversing them and ignores 'copied_to', 'duplicates' and 'relates' relationships as these do not imply any dependency.
#22 Updated by Uwe Koloska almost 7 years ago
It looks like related to has a direction!
- create three tickets 1, 2, 3
- create relation 1 -> 2
- create relation 2 -> 3
- create relation 3 -> 1 gives the circular dependency error
- create relation 1 -> 3 succeeds
- duplicates (no error with duplicated by)
- copied to (no error with copied from)
Since both are really meant to have a direction their's nothing wrong if there is a circle of all duplicates or copied to, but it should definitely not treat all relations the same.