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: 

Why isn't this script working to restrict subtasks from being created under Epics?

Julia
Contributor
August 31, 2021

I am trying to restrict sub-tasks from being created underneath epics. I have seen that the following scripts have worked for folks, but I can't get them to work for me. Please let me know if you see what I am doing wrong! Attached is a photo of one of the scripts in the validator section of the create transition. Help!

!["Epic"].contains(issue.parentObject?.issueType.name)
["Task", "Bug"].contains(issue.parentObject?.issueType.name)

Screen Shot 2021-08-31 at 9.54.38 AM.png

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Tye Joe Wai
Contributor
September 6, 2021

Hi Julia, I tried using the same script that you used, and it worked in my Jira instance. Like what Martin mentioned above, the execution history shows that it had not run yet, were the changes saved and applied successfully?

If the validator ran and failed, it would've shown up in the history and tell us why it failed.

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
August 31, 2021

Hi @Julia ,  I can see that validator has not ran yet. Did you publish your workflow's draft?