Forums

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

Jira automation

Anette Noll
Contributor
April 10, 2025

Hi all,

could please someone bring me on the right track how to proceed with the automation described in the annex.

Your advices and ideas are really appreciated.

 

Thank you, Anette

 

Jira_Automation.png

 

 

3 answers

1 vote
Bill Sheboy
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.
April 16, 2025

Hi @Anette Noll 

What problem are you trying to solve?  That is, "why do this?"  Knowing that may help the community better understand the need to offer better suggestions.

Until we know that...

 

What type of project is this: company-managed, team-managed, JPD, etc.?

 

What is the triggering event for your scenario as your rule seems to be checking the incorrect issue type: the Story rather than the Sub-tasks?

For example, is it this:

GIVEN a Story of Issue Type A
AND the Story is not in Status Z
AND the Story has a zero-to-many Sub-tasks of Issue Type B
AND the Story has a zero-to-many Sub-tasks of Issue Type C
AND the Story has a zero-to-many Sub-tasks of Issue Type D
WHEN one of the Sub-tasks of any type transitions status
AND any (all?) of the Issue Type B Sub-tasks are now in Status X
AND any (all?) of the Issue Type C Sub-tasks are now in Status Y
AND any (all?) of the Issue Type D Sub-tasks are now in Status Y
THEN transition the Story to Status Z

 

Kind regards,
Bill

Anette Noll
Contributor
April 17, 2025

Hi @Bill Sheboy ,

thanks for reminding me to be more precise. 

Project-type
= company-managed

This is to be achieved
= if parent is in a certain status and all subtasks are in defined status,  parent transitions automatically to next status

 

Initial Conditions:

parent work item is of Issue Type A

parent work item is in Status Z0 (status before Status Z)

The parent work item has zero-to-many sub-tasks of Issue Types B, C, and D

 

Trigger:

One of the sub-tasks of any type transitions status …

 

Conditions:

And all sub-tasks of Issue Type B are in Status X 

And all sub-tasks of Issue Type C are in Status Y

And all sub-tasks of Issue Type D are in Status Y

 

Action:

Then transition the parent work item to Status Z

 

I hope this explanes better what I am trying to achieve.

Thanks for your time.

 

Best regards, Anette

 

Bill Sheboy
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.
April 17, 2025

Thank you for clarifying the scenario.  There is a template in the rules list you could start with named: 

When all sub-tasks are done → move parent to done

With that as a starting point, you could change the Related-Issues Condition to use JQL (rather than just checking the subtasks), and then copy it so both subtask cases are covered.

As an example, and assuming the rule branches to the parent, the JQL for the first condition could be:

parent = {{issue.key}} AND issueType = "Type B" AND status != "Status X"

Please note I inverted the condition to test the status is not equal, and then the rule condition would check that None Match Specified JQL.  Do the same thing with another condition for testing the other sub-task types.

 

Please try creating that rule and let us know what you find.  Thanks!

Anette Noll
Contributor
April 22, 2025

Hello @Bill Sheboy 

Thank you for your response.

To be honest I don't quite understand your approach with the inverted condition, due to my little experience with automation.

What I have done is to start with the template you recommended and tried a lot of combinations. 

It works for one sub-task type, but not for more. What is wrong with this?


Screenshot 2025-04-22 152418.png

Best regards, Anette





Bill Sheboy
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.
April 22, 2025

Please show an image of the audit log details, with all of the areas expanded, to show which rule steps happened.

As written, your rule will stop when any condition is not met.  Have you confirmed the Status values you are using in the JQL conditions for each subtask type are correct?

Anette Noll
Contributor
April 23, 2025

Hello @Bill Sheboy 

I just made another attempt and then had a look on the audit log.

However, this information does not gives any insight into the problem. It seems that this automation is not running at all, although it is enabled.

 

2025-04-23 18_06_19-Audit log - Automation - Jira.png

Bill Sheboy
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.
April 23, 2025

The entry you show is for a rule edit, not an execution.

Please transition an issue to trigger the rule, check the results, and then post the image of the audit log details showing the rule execution.

Anette Noll
Contributor
April 24, 2025

Hello @Bill Sheboy ,

here a comprised screenshot with two different kinds of messages.

Screenshot 2025-04-24 120511.png

 

Bill Sheboy
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.
April 24, 2025

Thanks for those images, and...

Because there could be zero-to-many subtasks, the built-in related issues condition with JQL may not help because it will fail when there are no subtasks.  Instead, you may need to use the Lookup Issues action with JQL (inverting the test as I noted earlier) and checking for no results.

 

For example, you want all of the subtasks of a certain type (if there are any) to all be "completed" before proceeding.  And so we could check that none are not completed:

  • action: lookup issues, with JQL of the following (assuming we are inside the branch to the parent)
    • parent = {{issue.key}} AND issueType = "Type A" AND status != "Complete"
  • smart values condition
    • first value: {{lookupIssues.size}}
    • condition: equals
    • second value: 0

 

Those two steps would take the place of the condition on the subtask for "Type A", and would would be repeated to test the other subtask type using different JQL.

 

Anette Noll
Contributor
April 25, 2025

Hi @Bill Sheboy 

please see my experience:

 

Screenshot 2025-04-25 162032.png

Bill Sheboy
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.
April 25, 2025

Those images are too small / low resolution to read.  Please repost them.  Thank you!

Anette Noll
Contributor
April 26, 2025

... please excuse; now better ones

 

Screenshot 2025-04-26 114009.png_01.png

Screenshot 2025-04-26 114100.png_02.png

Screenshot 2025-04-26 114322.png_03.png

Bill Sheboy
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.
April 26, 2025

Thank you for the updated images!

The transition action needs to be inside of the branch and after that condition.  Please drag-and-drop it below the condition and then re-test.

 

Finally, your current rule only tests one subtask type.  Do you want to still test both types?

Anette Noll
Contributor
April 26, 2025

Hello @Bill Sheboy ,

I corrected position of transition action and then re-tested just the same scenario:

2 sub-tasks of same issue type.
I transioned both sub-tasks to status "Zustimmung", but this time parent status did not change.

As to your question concerning the other 6 sub-task issue types .... doesn't it make sense to wait testing them until automation for at least one issue type works?

Screenshot 2025-04-26 205648.png_A.png

 

Screenshot 2025-04-26 205814.png_B.png

Bill Sheboy
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.
April 26, 2025

Yes, I does make sense to get one type working first.

Please expand the audit log details to show everything by expanding the arrows at the right side of the log.  That will show what else happened as the current image just stops at the start of the branching.

Anette Noll
Contributor
April 26, 2025

It has already been completely expanded; no arrow or possibility to expand with the branching rule:

 

Screenshot 2025-04-26 233102.png_c.png

Bill Sheboy
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.
April 27, 2025

Based on what you show, the trigger issue POT-1604 has no parent issue.

I suspect you only want this rule to run when the trigger issue is one of your subtask types, and so after the trigger add an Issue Fields Condition to check that the Issue Type is one of your types:

  • trigger: issue transitioned...
  • condition: issue type is one of your list of subtask types
  • branch: to parent
    • ...
Anette Noll
Contributor
April 28, 2025

Hello @Bill Sheboy ,

great .... after all it works with 1 sub-task type.

After that I added another condition with another issue type, branched it to the parent, updated jql. 

 

Screenshot 2025-04-28 091056_D.png

Test 1:

After transitioning all items of the first sub-tasks type (not the second issue type), parent already transitions 

Test 2:

Transitioning all items of the second sub-task typ, parent does not transition;

only after transitioning the first sub-task type

Bill Sheboy
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.
April 28, 2025

That sounds correct, based on the rule you show now.  Do you agree?

The final steps would be:

  • add the other subtask types in that new condition after the trigger
  • adding another lookup issues and condition check for the other subtask type inside the branch
Anette Noll
Contributor
April 28, 2025

Hello @Bill Sheboy ,

what I wanted to say is, that I added another condition after the trigger for a second sub-task type.

But it doesn't work for the second subtask-type, only for the first one.

Test-scenario:

new workitem only with 2 sub-tasks of second type, both in status "complete", but parent does not transition.

The audit log shows No actions performed

Bill Sheboy
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.
April 29, 2025

Please post an image of your current complete rule and of the audit log details from that last rule execution (with all of the details expanded).  Thanks!

0 votes
Anette Noll
Contributor
April 16, 2025

Hi Carol,

just tested what you described and serveral other ways as well, but parent does not transition.

 In the screenshot below I described what I did. Would be great if you could have another look at it, what may be wrong with this.

Thank you!

 

Regards, Anette

 

Screenshot 2025-04-15 094144.png

 

 

0 votes
Carol Lage
Contributor
April 10, 2025

Hi Anette,

Looking about your problem, I don't know if I understand the different scenarios you have with your sub-tasks, but you can try this:

1. You can add a branch for each situation you have different denominations that will proceed with different outcomes. If you have different status doing the same thing on rule, you can use the JQL to group the status you want like Status in (Status1, Status2), like in the screenshot.


subtask rule example01.png

2. To set the rule for all projects, click on Rule details > Scope, and change the field to global (you have to be an admin to choose it) > Turn it on/Update.

subtask rule example02.png


Also, check this documentation about branching that can be useful in your case - Jira automation branches | Cloud automation Cloud | Atlassian Support

I hope this helps, and please let me know if it works or if you need to discuss it further.

Regards,

Carol

 

Anette Noll
Contributor
April 10, 2025

Hi Carol,

thanks for your reponse.

I will try it today or on Monday and will let you know if it works as needed.

 

Best regards, Anette

 

Like Carol Lage likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events