Forums

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

A Bug in Jira's Automation - When all Subtasks are done, Move parent (Story) to done

Mostafa Hegazy February 21, 2022

So I have a current issue with Jira's automation. I think it's a Bug.

First we have Jira's normal "Subtask", and that when I created the automation for it all goes smooth and well, as so:

image.png

 

However, I have created another Subtasks issue type called "Test Cases" (with it's own workflow) and when both subtasks are created within the same story, the "related issue condition" within the automation rule always fails even when I use JQL within the "related issue condition" so that I can specify exactly "Subtasks" and not "Test Cases" Subtasks , Like so:


image.png 

 

Please let me know if you can help me with this situation or if it's a current issue within Jira

2 answers

2 votes
Alex Koxaras -Relational-
Community Champion
February 21, 2022

@Mostafa Hegazy hi,

I've tried your rule and it works just fine:

parent rule.png

I've got 2 different subtask issue types. The first three are sub-tasks, whereas the fourth one is a "test case" subtask. The rule is triggered with every subtask move to done. And when I finally move the "test case" to done, it's also moves the parent.

dsp198.png

Mostafa Hegazy February 22, 2022

Yes this is the first scenario that goes smoothly without any issues, but if you tried creating a new subtask issue type, and adding it to the same story as that subtask, it will not work. it will fail

Alex Koxaras -Relational-
Community Champion
February 22, 2022

@Mostafa Hegazy that's what I did in the scenario above. I have two different subtask issue types: Subtask and Test Case. They both work fine.

  • I would suggest that you share a screenshot of your rule's log
  • A screenshot of your issue type scheme
  • And the complete steps you are taking
Mostafa Hegazy February 22, 2022

I'll send you screenshot, but I don't want when all subtasks issue types are done then parent is done.


I want when ONLY "subtasks" subtask issue type is done, then parent is done.

 

So keep the "Test Cases" subtasks, "To-do" or "In Progress".

Mostafa Hegazy February 22, 2022

So, When I change only the "Sub-tasks" subtask issue type to done, I want to change Parent to Ready for Testing.

Hence it's not suppose to be in "Related Issue Conditions": Issue type is one of Subtasks, Test Cases.

It's suppose to be only Subtasks.
image.png

image.png

I think a zoom call, would be way faster & efficient if that's okay with you

Alex Koxaras -Relational-
Community Champion
February 22, 2022

@Mostafa Hegazy why didn't you say so? :)

Then do this! I've tested it on my instance and only when all sub-tasks are done (not test-cases) then the parent is moved to done

transition automation01.pngresults01.pnglog01.png

Mostafa Hegazy February 22, 2022

Thank you @Alex Koxaras -Relational-

However it worked as soon as one subtask has transitioned to "Done", I need the transition to happen as soon as both are transitioned to "Done"

Mostafa Hegazy February 23, 2022

@Alex Koxaras -Relational- 

 

Let me know if you figured it out

0 votes
Sachin Dhamale
Community Champion
February 21, 2022

@Mostafa Hegazy ,

 In the "Related issue condition"  have you try with following parameter. In the Matching JQL -

status="DONE" only.

Releted Issue Condition.png

Mostafa Hegazy February 21, 2022

that's exactly the first try, and it works perfectly is there is only Jira's default "Subtasks", but when I added a new subtask "Test Cases" (I created it). it always fails.

I feel like Jira can't couldn't cope with the new subtask, if it is or isn't a subtask so it just fails.

So I even created a JQL within the "Related issues" field as so:

issuetype = Sub-task AND issuetype != "Test Cases"

 

Still doesn't work!

Sachin Dhamale
Community Champion
February 21, 2022

@Mostafa Hegazy ,

In the Matching JQL Can you try 

issuetype in (Sub-task, Test Cases) and status = "Done" 

Because you wanted to treat "Test Case" as subtask 

Mostafa Hegazy February 22, 2022

Actually not, I wanted that only once all "Sub-tasks" subtask issue types is done, then the story to transition to "Ready for Testing", NOT when "Test Cases" Subtask issue type to transition to done as well.

 

They both have different workflows, and different roles assigned to each

Sachin Dhamale
Community Champion
February 22, 2022

@Mostafa Hegazy - Ohh In that case 

status="Done" and issuetype="Sub-task" should  work for you.

Mostafa Hegazy February 22, 2022

yes, I have tried that as well. that also fails.

and we don't need to add status = done, since it will be there in the condition below

Jan de Beijer December 7, 2022

Hello Mostafa, have you resoled this issue??

because i want exactly the same as you, but by me it is also failing in automation. if you resolved it, will you please put a print screen of the automation in here.

Jan

Suggest an answer

Log in or Sign up to answer