The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Need help: Create Post Function that creates a subtask and has a condition to check RelatedIssue

Need help: Create Post Function that creates a subtask and has a condition to check RelatedIssue

Gary Morrow
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 4, 2023

We have Data Center and JWME...

 

I need to create a Post Function that creates a subtask (easy part) and copys some of the parent functions fields (also easy) but that has a validation condition:

relatedIssue.get("status")?.name == "Done"

 

I'm using the exact groovy expression in another post function but it is performing a transition but it won't let me use it for this one. 

 

It gives me an error like the syntax is wrong but again I'm using the exact thing (different status name is all) in another Post Function.  

 

Any help would be great.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Kseniia Trushnikova
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 Champions.
July 4, 2023

Hey Gary,

Can you share a screenshot of the post function configuration? I've just checked the validator and it works correctly.