Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,297,309
Community Members
 
Community Events
165
Community Groups

How to create a dependency between sibling subtasks with ScriptRunner

Deleted user Dec 19, 2018

Hello everyone,

The scenario is the following one: I have a parent issue with 2 subtasks (sub1 and sub2), and I need sub2 cannot transition to "In progress" until sub1 is in Resolved status.

To achieve this, I have thought about creating a Simple scripted validator (ScriptRunner) in the transition "To In progress" of sub2 workflow, with this code:

import com.atlassian.jira.issue.*

String key = issue.key
issueFunction in subtasksOf('issueFunction in parentsOf("issuekey = key") AND issuetype = Sub1 AND status = Resolved')

 

But I get the error:

Error.jpg

I would appreciate any help. Thanks in advance.

Cheers,

Almu

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Coming Soon: Insight Changing to Assets

The 2020 acquisition of Mindville added powerful asset and configuration management capabilities to Jira Service Management in the form of Insight. Following the completion of that integration, custo...

37 views 0 1
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you