JMWE Cloud - Access parent issue status in a transitional condition

Tom Gross November 29, 2023

Trying to migrate some JMWE from server to cloud.  Looks like a I need to convert groovy on server to Nunjucks in cloud.  Any ideas what might be wrong? This is on the Post Function of the SubTaskServer.jpgCloud.jpg

See attached images of server and cloud

 

1 answer

1 accepted

0 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2023

Hi @Tom Gross 

you can try this:

{{targetIssue.fields.status.name == "In QA" or targetIssue.fields.status.name == "Ready for QA"}}
Tom Gross November 30, 2023

This workflows is for the subtask.  As the subtask is created, this event needs to look at it's parent issue and check the parent's status.  If the parents status is either one of these two, it will execute the Failed QA transition name ... which is a parent status of "In Development".

In looking at the script you provided, I don't think it's look at the parent issue?  Is it?

Tom Gross November 30, 2023

UPDATE:  I tested out the code you supplied and it WORKS!  Thanks@

However, I'm trying to understand the syntax and how the targetIssue works.  Is it because the event is set to the Parent of the SubTask (JMWE) and not the subtask you're on? You don't need to explicitly reference the parent?

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2023

Hi @Tom Gross 

targetIssue represents the "Target Issue(s)" you selected under "Issue(s) to operate on" (in this case, to transition). In your case, that's the parent issue of the current issue.

Tom Gross November 30, 2023

THANKS!

Tom Gross December 1, 2023

-

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events