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

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?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, state of product 2026, product teams report, developer experience, product manager survey, AI impact, product team stress, product teamwork, dev workflow insights, 1000+ PMs, product leadership research

State of Product 2026

State of Product 2026: your pulse check on product development today. We asked 1000+ real teams how they’re feeling–and they had a lot to say.

Get the report
AUG Leaders

Atlassian Community Events