How to Hide create sub-task option on epics?

Bunty
Contributor
November 9, 2018

Hello All,

I want to hide create sub-task option on Epics. I was following the below URL but it doesn't seem working in the 7.12.3 Jira version.

https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-Restrict-Creation-of-Subtask-based-on-IssueType-in-JIRA/qaq-p/525797

Can anyone help me?

Thanks,

Manikanta.

 

1 answer

1 accepted

2 votes
Answer accepted
Neta Elyakim
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 Leaders.
November 11, 2018

Go to your sub-task workflow (make sure the workflow is associate only for the sub-task issue type), click on create transition > Validator > add Validator > Script Validator [ScriptRunner] > Simple scripted validator :

In the condition box paste the code:
I changed the code to check if the issue type is Epic > then block the creation

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

Add to the "Error Message" box your message.

Leave the "Field" empty.

Let me know if it's work for you.

Bunty
Contributor
November 11, 2018

Hi @Neta Elyakim,

Thanks a lot!!!

It's working but I want to hide that create sub-task button. 

Is that possible?

Thanks again,

Manikanta

Neta Elyakim
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 Leaders.
November 11, 2018

It's may be possible with JS but I never did it.

Julia
Contributor
August 31, 2021

Any idea why this isn't working ? 

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

Suggest an answer

Log in or Sign up to answer