When an issues is created it triggers the creation of other issues based on user inputs and currently i'm able to link those created issues to the original issue. I want to take it another step and link all the automatically created issues to each other as well so there's a matrix of linked issues. This will allow my users to see all of the linked issues regardless of whether they are viewing the trigger issue or any of the created issues.
Thanks for your recommendation, but I won't have an idea of what the issues are since they are automatically being created by the automation. This might explain better:
Issue 1 created then
Issue 2 created automatically (linked to issue 1)
Issue 3 created automatically (linked to issue 1)
I want Issue 2 and Issue 3 automatically linked as well.
I thought you were creating them manually during a workflow postfunction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would try this:
List<Issues> list <- this should be filled with the issues you created before
for( int i = 0; i< list.size() ; i++ ){
for (int j=i+1; j<list.size(); j++){
Create a link from list(i) to list(j)
}
}
If you have a 4 size list
first iteration: list(0) link with list(1), list(2), list(3)
second iteration: list(1) link with list(2), list(3)
third iteration: list(2) link with list(3)
I'm assuming you dont want to link 1 with 2, and also 2 with 1.
If you want that, then
for( int i = 0; i< list.size() ; i++ ){
for (int j=0; j<list.size(); j++){
if(i != j){
Create a link from list(i) to list(j)
}
}
}
first iteration: list(0) link with list(1), list(2), list(3)
second iteration: list(1) link with list(0), list(2), list(3)
third iteration: list(2) link with list(0), list(1), list(3)
forth iteration: list(3) link with list(0), list(1), list(2)
I hope that gives you an idea.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note: I haven't try it, but I think it could work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.