Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,366,446
Community Members
 
Community Events
168
Community Groups

Hiding create subtask option only for Epic Issue type

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

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.

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