How to block Epic Status based upon the Stories Status

Hi 

I want to block Epic Status based upon the task Status, like the way we have subtask blocking condition for task. in Script runner plugin.

 

Could anyone help.

 

Regards,

Sajid

 

2 answers

1 accepted

You can use the same conditions as the one for subtasks:

https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/conditions/all-dependent-issues-resolved.html

Write a scripted condition similar to the one below:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLink

linkType = ["Epic-Story Link"]

linkMgr = ComponentAccessor.getIssueLinkManager()
for (IssueLink link in linkMgr.getInwardLinks(issue.id)) {
    if (linkType.contains(link.issueLinkType.name)) {
        if (link.sourceObject.status.name != "Done") {
            passesCondition = false
        }
    }

}

Hi Syed,

Can you please post the correct code! I was trying to achieve this but it's not working 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Jan 15, 2019 in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

261 views 4 1
Join discussion

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