---
title: "Prevent Sub-task Creation in Jira Cloud"
canonical: "https://support.appfire.com/space/SUPPORT/80878385/Prevent%20Sub-task%20Creation%20in%20Jira%20Cloud"
format: markdown
---
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:

[https://appfire.atlassian.net/wiki/spaces/JJUPIN/pages/13240253](https://appfire.atlassian.net/wiki/spaces/JJUPIN/pages/13240253) 

Atlassian documentation on Jira Expressions:

[https://developer.atlassian.com/cloud/jira/platform/jira-expressions/](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) 

[https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference/](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference/) 

Power Scripts Knowledgebase article on Jira Expressions testing:

[https://appfire.atlassian.net/wiki/spaces/SUPPORT/pages/80877739](https://appfire.atlassian.net/wiki/spaces/SUPPORT/pages/80877739) 

## Additional Help

Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.

 

## Related articles



> Macro (contentbylabel)

> Macro (details)
> 
> | Related issues |  |
> | --- | --- |