Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to filter for issues with subtasks?

This is an answer rather than a question.

I'm in the Cloud and I need a way to see issues that do not have subtasks, for a set of specific parent and subtask issue types. There is no nice way to use the out-of-the-box filtering or plugins in the Cloud to find issues with subtasks. 

What I did:

  1. Created a "hasSubtasks" custom number field. (Do not add it to anything, it doesn't need to be visible.)
  2. Added a post function to the Open transition for the subtask workflow to increment hasSubtask by 1.
  3. Added a post function to the Open translation for the subtask workflow to copy the value to the parent issue.
  4. Filter on issues where hasSubtasks is not empty or as a specific value (sometimes I want to see if there is more than one subtask).

It's simple but it works for me. Hope it meets someone else's needs, too.



6 answers

Good "question". Just one point. How do you search for issues with more than 1 subtask. As I understand this if you create two subtasks each of them has in "hasSubtasks" the value 1. And this value is copied twice to the parent (but the second copy overwrites the first one), so the parent has value 1 in that field, or?

You're correct. I forgot a step in my explanation.

2a. Add a post function to copy the parent hasSubtask value to the subtask.

2b. Add a post function to increment the hasSubtask by 1.


Ah, ok. Before you increment the value in your subtask, you first copy it from your parent, and after incrementing the value of the subtask it will be copied back to the parent. Smart!

Is there any way you can attach a screen shot of what the filter produces?

Also, what made you create this solution?  

I have issues grouping our subtasks with the parent.  As everyone knows, when you create the subtask it uses the next number sequence and does not associate that subtask to the parent number.  example - parent ticket PROJ-89 with subtasks tickets of PROJ-124, PROJ-138, PROJ-139.

It would be nice if it would truncate the parent number for the subtask - example - parent ticket PROJ-89 with subtasks tickets of PROJ-89.1, PROJ-89.2, PROJ-89.3

What made me want to do it was that we had no way of knowing if we had assigned subtasks. One of the issue types we have is a document issue. We have a subtask approval/rejection workflow for those issues. It's possible for someone to set document (parent) issue to "ready to approve" but not have added the approval (child) subtasks for each person to do their approval. (For example, you would add a separate document approval subtask and individual assignee for each person who should sign off on the document.) Rather than clicking on every issue that is ready to approve to see if it has child approval subtasks, I can see it easily based on the subtask count. I can also see if it doesn't have enough subtasks, meaning the didn't assign the requisite number of approvers. Regarding your other idea of the parent-child tasks having linked numbering, this really isn't an issue for us right now but I can see lots of reasons it would be helpful to other things I'd like to do with JIRA in the future.

Sigrid - Thank you for the quick response and reasoning for your changes.  The explanation leads to many additional thoughts on my side of what we could be doing with JIRA for our organization.  I have place this information on my list of follow ups and business model modifications.  


Thank you again!

Sigrid - just what I was looking for, thank you!

0 votes

What happens if a subtask is deleted?

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you