Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to block Epic Status based upon the Stories Status

sajsyed February 17, 2016

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

1 vote
Answer accepted
Boris Georgiev [Appfire]
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.
February 18, 2016

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
        }
    }

}
0 votes
T May 26, 2017

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
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events