Hi Team,,
I am working on requirements to restrict subtasks for specific parent issue types. Will these cases fit the scenarios?
I used this behavior to restrict the subtasks to parent tickets. https://library.adaptavist.com/entity/restrict-subtask-options
How to restrict the sub-tasks in the below scenarios. Do you have any script samples to achieve these requirements?
1. If Parent is issue type "Project" : I shouldn't be allowed to move "Sub-task" issue type to "Connection" sub-task.
2. And moving parent "Opportunity" issue type to "Project" issue type, I should not be allowed if any "Connection" subtasks are created to the Opportunity parent.
Hi @Lakshmi S
If I understand correctly, what you need is related to the "Move" option, because it allows you to change the issue type, perhaps overriding the behavior set in the Create Screen.
In that case, you can't limit the list of options, but you can hide the "Move" option.
I would only recommend this approach in one specific case: when in both scenarios, the issue type cannot be changed. For example, if you can change the issue type from "Opportunity" to "Discovery" but not to "Project" (as described in the second scenario), then hiding the "Move" option is not a viable solution for you.
To know more, you can read this article from scriptrunner talking more about Script Fragments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The library script that you referenced has the basic structure that you want. You will have to modify the specific conditions to meet your use case.
I am not sure what question you are asking.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Derek Fields _RightStar_ ,
What I am asking is , How to restrict the sub-tasks in the below scenarios using the scripter runner?
1. If Parent is issue type "Project" : I shouldn't be allowed to move "Sub-task" issue type to "Connection" sub-task.
2. And moving parent "Opportunity" issue type to "Project" issue type, I should not be allowed if any "Connection" subtasks are created to the Opportunity parent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I understand correctly, you want to limit the options on the Move screen, which I don't think is possible. The script that you shared will work on an Issue Create or Issue Update, but not on Move, which is controlled differently.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.