How to transition parent Issue using SIL script when the child linked issues changed with another status

Hello,

I have Jjupin Plugin installed on JIRA 7.1 and want to try auto transition the issue as per validation on linked issues.

Example:- I have parent issue type like (Story Task) and it has multiple child issue type (Task) which are linked to the parent (Story Task)  both the issue types (Parent & Child) having different Workflows and I want to auto transition the Parent (Story Task) as per the status changed on all Linked issue (Task)

 

Here I am giving example I am using in SIL

 

Please assist how do I achieve this using SIL program with step by step configuration

if(isNull(parent)) {
if (issueType == "Task") {
    string [] linkedIssues = linkedIssues(key, "relates to");
    for(string linked in linkedIssues) {
    if(%linked%.status == "Design Completed") {
       return;
}
}
}
autotransition("Design Completed", parent);
}

2 answers

This widget could not be displayed.

Hi Akash,

It is a little bit confusing for me: do you have a parent issue and some children issues (like subtasks), or an issue and some dependent issues (linked with "relates to")?

The "parent" standard variable works only for subtasks. To identify the subtasks of an issue, you have to use "subtasks(<issuekey>)" instead of linkedIssues.

 

Hello Ligia,

I need to change the status of Linked Issue which has Link "relates to" 

Example :- I have 3 project P1, P2 and P3

P1- issue type (UC story)

p2- issue type (UC story task)

p3- isue type (Task)

and the relations are 

Linked p1–> p2–>p3

If ALL p3 issues are closed auto transition the p2 status to Closed and then auto transition the p1 status to closed

,Here is my updated script I am running this script as post function on transition (Closed) to every linked issue transitions

 

string sk;
bool allclosed = true;
string[] mylinarray = linkedIssues(key);
for (sk in mylinarray) {
if (%sk%.status != "Closed") {
allclosed = false;
}
}
if(allclosed) {
autotransition(Closed, %mylinarray%, true);
}

This widget could not be displayed.

Hello Ligia,

In my scenario, all the  child are Linked issue I am not using as parent-child (subtask)

 

All the relation is for Link issue i need to transition the main issue which is depends on linked issue it has.

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Friday in Jira

New 5k User Limit and Other Cloud Updates

Hi all! Lauren here from the Enterprise Cloud marketing team.  I have some exciting Cloud updates from #AtlassianSummit that I wanted to share. We want everyone in your organization to be ab...

119 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you