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: 

How to restrict subtask types to certain task type

Martin Vali
Contributor
May 29, 2025

image.png

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Cristiano Alves -Appfire-
Contributor
May 29, 2025

Hello @Martin Vali 

 

Cristiano from the Appfire Team here.

 

This should be possible using our tool, Jira Misc Workflow Extension (JMWE).

You may set up a validator on the "Create" workflow with specific conditions with your own validator.

Just select the option "Build-your-own Validator (JMWE app)" and select the JQL code option.

the code should look something like this:

issue.parent && issue.parent.issueType.name == "Story"

I used story as an example, but you are able to select any issue type available in the project scheme.

Then you check the box "Conditional validation" with the code:

issue.issueType.name == "Sub-task"

This guarantees that only sub-tasks fall into the condition, and other issue types are created normally.

Here is a screenshot of it.
Screenshot at May 29 3-47-04 PM.png

You are also able to put the "Conditional" inside the code, that way you may add more to it.

// Only apply to subtasks 
if (issue.issueType?.subTask) {
// For subtasks: require Story parent
return issue.parent && issue.parent.issueType.name == "Story"
} else {
// For non-subtasks: always allow creation
return true
}

 

Feel free to contact our support team if you have any doubt.

Regards,

Martin Vali
Contributor
May 29, 2025

@Cristiano Alves -Appfire- thanks , Will concider your app

0 votes
Jack Brickey
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.
May 29, 2025

Hi @Martin Vali , I am not sure I follow your question exactly. When you create a new issue type you can decide if it is at level 0 (standard) or -1 (sub-task). 

IMG_5798.jpeg

Jack Brickey
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.
May 29, 2025

Oh...I think you are asking how to restrict the association of different sub-task type to the parent work item type. So that you can't add some sub-task types to some parent types.

I believe this can be accomplished in CMP project workflow by using the issue.parent.issuueType.name property on the Create transition. Disclaimer- I have not tried this in a long time.

Like Martin Vali likes this
Jack Brickey
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.
May 29, 2025

Hmmmm... Actually that is inaccurate...my memory is failing me here. Let me play with this a bit....

Jack Brickey
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.
May 29, 2025

I researched this a bit more and unfortunately I don't think this is possible OOTB. I expect there are solutions using third-party apps.

Like Martin Vali likes this
Martin Vali
Contributor
May 29, 2025

@Jack Brickey thanks for trying

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events