Forums

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

How can we disable 'Create sub-task' option from menu drop down on particular main issue type

Lakshmi CH
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.
October 12, 2022

Hi Team,

 We would like to disable 'Create sub-task' option from menu drop down on particular main issue type. I have applied this on sub task workflow and added a 'simple scripted validator' on the subtask workflow create transition with the following script runner script, but it seems not working, not blocking the "Create sub-task" option for parent issue types of        " Order Performance and Order Visibility Request " . 

issue.getParentObject().getIssueType().getName() != 'Order Performance and Order Visibility Request' 

 

1 answer

0 votes
Florian Bonniec
Community Champion
October 12, 2022

Hi @Lakshmi CH 

Can you try the code below replacing Story by your type.

if(issue.getParentObject() && issue.getParentObject().issueType.name == 'Story'){

    return false

}else{

    return true

}

It has to be set as a simple script validator in the sub-task workflow.

 

You can also add a Script Fragment to hide the sub-task related UI elements.

fragmenthidesubtask.PNG

Regards

Suggest an answer

Log in or Sign up to answer