Prevent Sub-task Creation in Jira Cloud
Preventing users from creating subtasks when the parent is of a certain type.Â
Jira Expression
The Jira Expression below does two things. The first part checks if the issue to be created has a parent. This is to allow issue creation of issues without a parent (that is, a standard Jira issue).
The second part (separated by the OR operator "||") is to define the issue type of the parent. If the subtask being created has a parent of (in the case of this example, issue type "Task" or "Story"), users will not be able to create subtasks.
issue.parent == null || ['Task', 'Story'].includes(issue.parent.issueType.name) |
Additional Pages
For instructions on creating Jira Expressions in a SIL Validator, see this Anova Apps documentation:
Conditions and Validators (Cloud)
Atlassian documentation on Jira Expressions:
Power Scripts Knowledgebase article on Jira Expressions testing:
Testing Jira Expressions for SIL Validators
Additional Help
Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.
Â
Related articles
Filter by label
There are no items with the selected labels at this time.