Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding create subtask option only for Epic Issue type

Sonal Sharma August 7, 2022

I am trying to achieve Hide create subtask under more options only for Epic Issue Type, I have used script runner fragments and under the script I write following code: 

issue.parentObject?.issueType.name in 'Epic'

But it seems not working, It hides create subtask for all the issue types like bug, story, etc. 

 

Will really appreciate your assistance. Thanks

 

1 answer

1 vote
Ivan Lima
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.
August 7, 2022

Hi @Sonal Sharma, welcome to the Atlassian Community!

Using the parentObject returns the parent issue or null if the issue is not a subtask. If it's only for Epic Issue type, you can try

issue.issueType?.name != 'Epic'

Note that the item will be visible if the condition returns true. Also, as a condition in a script fragment, if you don't specify that it applies to only one project, it will hide the action to all projects.

Sonal Sharma August 7, 2022

Thanks, @Ivan Lima for the quick turnaround! It did work for me. Can you please guide me on this as well, Really appreciate your help: 

https://community.atlassian.com/t5/Jira-questions/When-someone-choose-one-option-from-single-select-list-then-in/qaq-p/2100630

Suggest an answer

Log in or Sign up to answer