View Issue Details

IDProjectCategoryView StatusLast Update
0011381mantisbtrelationshipspublic2020-03-15 15:23
Reporterbrianstv Assigned Todregad  
Status closedResolutionfixed 
Product Versiongit trunk 
Target Version2.24.0Fixed in Version2.24.0 
Summary0011381: Dependency Graph crash on circular parent child relationships

The Dependency Graph will return a blank page if you have 3 issues that are dependent on each other in a circular way.

Steps To Reproduce

Create 3 issues.
Make issue 1 parent of issue 2
Make issue 2 parent of issue 3
Make issue 3 parent of issue 1
click on the Dependency Graph.
Returns blank page, or download of 0 bytes from bug_relationship_graph.php depending on your browser.

Additional Information

This was caught in testing, not something that would normally be done.

TagsNo tags attached.




2019-09-21 20:17

developer   ~0062875




2019-09-21 20:20

developer   ~0062880

I could reproduce this with latest master, the page throws an application error due to invalid parameter type. The PR fixes the problem, as shown in attached screenshot

circular.png (2,914 bytes)   
circular.png (2,914 bytes)   

Related Changesets

MantisBT: master f07fea0d

2019-09-21 20:10:12


Details Diff
Fix circular dependencies in Relationship Graph

In the case where we have a cycle in parent-child relationships (i.e.
A -> B -> C -> A), the Relationship Graph fails with an INTERNAL
APPLICATION ERROR - Argument 1 passed to relgraph_add_child() must be of
type array, string given in core/relationship_graph_api.php line 427.

The recursive call was passing the bug id instead of the bug list.

Fixes 0011381
Affected Issues
mod - core/relationship_graph_api.php Diff File