Prevent subtasks on a specific issue type via workflow

Paul Alexander
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.
February 21, 2014

Is there a Property Name/Property Value pair I could employ on the workflow to prevent a subtask from being created against a specific parent issue type. If not obvious, the goal is to prevent someone from creating a subtask on an Epic issue type.

I currently use a custom property to prevent work logs from being generated against parent issues so I'm seeking something similar.

2 answers

2 votes
Paul Alexander
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.
February 27, 2014

After thinking about this for a while, I came up with a cheap, simple solution...

My Epic issue type uses a distinct workflow that has it's own set of statuses, so in order to allow a subtask to be created from an Epic, from all of my subtask workflows, I simply force the status of the parent to be in one of the statuses not afforded to the Epic issue type. I'll explain in practice below:

  1. Epic (parent) uses these statuses:
    1. Requirements
    2. Ready For Approval
    3. Approved
    4. In Progress
    5. Completed
    6. Deployed
  2. Story (and my other parent issue types) do not use any of these statuses.
  3. So, on each of the subtask workflows I use, I only allow creation of a subtask if the parent's status is not in those defined in #1 above.
  4. A nice user error is presented if an attempt is made to do so - a little misleading, but it solves my problem...no more subtasks getting added to an Epic.
Bogdan Gorka
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.
May 11, 2017

Hi Paul, I came across your post which looks like the solution to the problem that I have.

My need is that I want to prevent my users from creating subtasks directly in Epics. They should only be able to link regular issues with Epics. 

Although generally I get the idea of your solution, however could you give me some example or direct me to Atlassian documentation where it is explained more about "I only allow creation of a subtask if the parent's status is not in those defined in #1 above"

Thanks in advance.

Paul Alexander
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 13, 2017

Bogdan, from the Create step of each subtask workflow in your instance, use a Validator like this to disallow the creation of the subtask if the parent is not in one of these other statuses. In my case, I use a set of statuses for my Epic that are not used by any other issue type so that is why my proposed solution works. Notice below it specifies statuses not used by the Epic.

 

The parent issue of current issue must be in one of the following statuses: Open, Engineering, QA, etc...etc...

0 votes
Jobin Kuruvilla [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.
February 21, 2014

No options on onDemand AFAIK. Haven't seeen any workflow property for this.

Suggest an answer

Log in or Sign up to answer