Automation Condition passing even if not true

Niklas Zarnecke
Contributor
February 12, 2025

Hey,

I'm currently stuck on a problem with one of our automtions in Jira. Here is the entry in the audit log:

auditlog.png

When I'm looking in the history of the Story, I can see that the Story is in the status "ON STG" since the 26th of Novemeber 2024:

history.png

So in my logic there shouldn't be any execusion of the rule, why does it try to move the Story any way?

Here is my config of the automation:

automation.png

Thank you!
Niklas

4 answers

1 vote
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2025

Hi,

you're using the parent branch so it seems that the trigger issue is a subtask of the story .

basically your rule is, when an issue is transitioned and it has a parent then make a transition in the parent.

Dick
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 12, 2025

@Niklas Zarnecke :

  • Your consecutive conditions always prohibit execution of the last condition. An if-block can help you out in this situation.
  • best verify the issuetype of the triggerissue first, to avoid doing stuff on stories and epics (also a child parent situation).

Kind regards,

Dick

Niklas Zarnecke
Contributor
February 12, 2025

Hey @Mohamed Benziane @Dick

I'm trying to move the parent (standard task) when all the sub tasks are in the same status. The first check if all sub tasks are in the same status seems to be working but the second check if the parent already is in the same status is not working the way it should.

The automation always moves the parent, even if it already reached the right status.

Best
Niklas

Like Dick likes this
Dick
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 12, 2025

What if one subtask is ahead and the remainder is all on one status?

Could you be "saved" by looking up the status of the task that is least progressed in the order of statuses in your project ? Said order should be "known" in the automation.

That would require a totally different approach from your original plan.

Kind regards,

Dick

Like Niklas Zarnecke likes this
Niklas Zarnecke
Contributor
February 12, 2025

Hi @Dick ,

now that I'm thinking about that, it really sounds better that way.
I totally missed the point, that we could get some inconsistencies that way.

I will have a look into that.

Best
Niklas

Like Dick likes this
0 votes
Vishal Biyani
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 12, 2025

@Niklas Zarnecke 

I relooked at your problem statement and this is my understanding.
You have a story or Task and n number of subtasks under the Story/Task.
Let's say all of them are in To DO status.
Team will transition the status of subtask and if all subtask have same status say In Progress then automation should trigger and update the status of Story/Task.

This is the rule I propose

  • Trigger: Issue Transition
  • Check if this is a subtask using JQL: issuetype in subTaskIssueTypes()
  • Add a lookup: parent = {{ triggerIssue.parent.key }}
  • Create a smart variable say subtaskStatusCount to Count the unique status of subtask: {{lookupIssues.status.name.distinct.size}}
  • Check if subtaskStatusCount = 1 [This means all subtask have same status ]
  • Create smart variable subtaskStatus and save the status of triggerIssue: {{triggerIssue.status.name}}
  • Branch to Parent
  • Check if {{issue.status.name}} does not equal subtaskStatus 
  • Transition the issue: Copy from trigger Issue.

Let me know if this works for you

 

 

0 votes
Duc Thang TRAN
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 12, 2025

Hello @Niklas Zarnecke 

Your requirements still need more details. However, after analyzing your screenshot, there might be some inconsistencies.

Which type of tickets are you targeting? Sub-task, standard task, or epic?

Niklas Zarnecke
Contributor
February 12, 2025

Hey @Duc Thang TRAN ,

when all my sub-tasks are in one status the parent should be moved as well.

It seems like the first check is working but the automation trys to move the the parent (standard task) anyway, even if the parent already reached the right status.

0 votes
Vishal Biyani
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 12, 2025

@Niklas Zarnecke 

Before branching into parent, can you try copying the trigger Issue values in smart variable. Then use those values to compare with parent status.

See if this helps resolve your issue.

 

Niklas Zarnecke
Contributor
February 12, 2025

Hey @Vishal Biyani

thank you, I will try that!

Best
Niklas

Suggest an answer

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

Atlassian Community Events