Forums

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

Restricting sub-tasks types depending on the parent issue type

Berto August 26, 2021

Hello,

I have a project with an issue type scheme that contains these issue types:

- Task
- Bug
- Sub-task type 1
- Sub-task type 2


When a user opens a Task issue and clicks on "create sub-task" transition, the only issue type possible should be "Sub-task type 1". If the issue were a Bug, then the only sub task type available should be "Sub-task type 2".

Do you know if this configuration can be achieved?
As far as I know, all standard issue types in the project have available all sub-task types defined in the project issue type scheme.

Thank you very much,

 

Berto

2 answers

2 accepted

3 votes
Answer accepted
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
August 27, 2021

Hi @Berto , welcome on the community. I just found this blog post by Adaptavist: https://www.adaptavist.com/blog/restricting-issue-types-with-scriptrunner-for-jira

Berto August 27, 2021

Thank you @Martin Bayer _MoroSystems_ s_r_o__ 

I wanted to know if it was possible without apps. 

Martin Bayer _MoroSystems_ s_r_o__
Community Champion
August 28, 2021

Hi @Berto , unfortunatelly not

Andy Hurley
Contributor
June 22, 2023

As far as I can see, even with Scriptrunner and Behaviours it is all but impossible to block a subtask type based on the parent issue type. The link only talks about restricting to subsets of users, not based on the parent type. 
I have hit this situation a few times and had to rely on user training.

Nic Brough -Adaptavist-
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.
June 22, 2023

SR lets you write a validator that can block creation of a sub-task, for any reason you care for. 

A validator will work in all cases, but I usually write a Behaviour as well, which will seriously discourage people from using the "wrong" sub-task.

Like Taranjeet Singh likes this
David Harkins
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.
July 22, 2024

Where is the guidance on limiting sub-tasks?

I've been able to limit issue types, but this does not apply to Sub-Tasks.
When using a behaviour, under what conditions would the behaviour be triggered?  Doesn't appear that the Create condition is triggering the behaviour.

2 votes
Answer accepted
Nic Brough -Adaptavist-
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 26, 2021

Not off-the-shelf.  Jira does not restrict what issue types you can create within a project, in any way.

You will need to look to apps like Scriptrunner to do this in the UI, or validators if you want to do it with the UI and integrated systems.

Berto August 27, 2021

Thank you @Nic Brough -Adaptavist- 

I wanted to know if it was possible without apps. 

Nic Brough -Adaptavist-
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 27, 2021

That's why I started with "not off the shelf".

Like Daniel Vargas Llopis likes this

Suggest an answer

Log in or Sign up to answer