Forums

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

simple scripted validated where feature cannot be resolved until linked issue are resolved

Heidi Fernandez
December 16, 2025

The feature has linked stories and tasks "child of" link type.  The children must be resolved (done/rejected status) before transitioning the feature to done/reject status.

1 answer

0 votes
Trudy Claspill
Community Champion
December 16, 2025

Hello @Heidi Fernandez 

Have you considered using the Linked Issues Condition instead? Then you don't have to write a script. But, in that case, the transition would not even be available if the "child of" linked issues are not in the appropriate status, and there would not be any explanation available to the user.

 

There is an answer on this 2021 post that partially addresses your question. The use case there is being applied to all linked issues.

https://community.atlassian.com/forums/Jira-questions/Validate-that-all-linked-issues-are-DONE-ScriptRunner/qaq-p/1660418

Google Gemini provided this information:

Screenshot 2025-12-16 at 11.22.38 AM.png

 

Disclaimer: I don't have a data center environment with Scriptrunner where I can test this.

Heidi Fernandez
December 16, 2025

We tried it and it confused the users.  Using condition, hides the status and they think there is a bug in the browser, etc. They would rather have a error message pop up to tell them what they need to do to do, to transition and why they cannot transition.

Heidi Fernandez
December 16, 2025

I created this and it isn't quite right.  What is missing?  

 

import com.atlassian.jira.component.ComponentAccessor


def children = ComponentAccessor.getIssueLinkManager()
def passCondition = true
def outwardLinks = children.getOutwardLinks(issue.id)


outwardLinks.each { link ->
    if (link.issueLinkType.name == "parent of") {

def destinationIssue =link.destinationObject

    if (!destinationIssue.resolution) {
        passCondition = false
    }
    }
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.0
TAGS
AUG Leaders

Atlassian Community Events