add epic link status

jjgalea October 31, 2016

Hi,

I created the script below to set the status of an issue to To Do' only is the custom value is set as 'No'

issue.issueType.name == 'Story' & cfValues['Isolated']?.value == 'No'

Is it possible to add, if the epic link status is 'To Do?'

Cheers,
Jason 

image2016-10-31 11:47:33.png

1 answer

0 votes
Thanos Batagiannis _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2016

Hi,

you get check the inward links and check for a soecific one (in your case the Epic-Story Link) with a script like

import com.atlassian.jira.component.ComponentAccessor

def flag = false
ComponentAccessor.getIssueLinkManager().getInwardLinks(issue.id)?.each { it ->
    if (it.issueLinkType.name == "Epic-Story Link" && it.getSourceObject().status.name == "To Do" ) {
            flag = true    
    }
}

regards, Thanos

Suggest an answer

Log in or Sign up to answer