Trouble with Automation Rule

Heidi Smith June 24, 2022

I've been asked to look at an automation rule to see whether I can fix it but no matter how I look at the problem, what combination of changes I make to the rule, the outcome still returns the incorrect results. 

We have a custom field which acts as a counter and the idea is that the counter adds 1 every time a new bug is linked to an issue (i.e. story, feature, task, sub-task). 

I have tried destination issue and current issue but what stumps me a bit is this: {{#}}{{issue.fields.customfield_10074}} + 1{{/}}

I'm not sure whether the syntax is correct. Hoping someone more skilled than I can advise on the correct configuration. 

PS: At the moment the custom field returns a number 15 when there are only 14 linked issues of which only 5 are bugs. 

 

JIRA Issue.png

 

2 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.
June 24, 2022

Hi @Heidi Smith -- Welcome to the Atlassian Community!

To confirm your use case, do you want the count to be the current count at all times, handling cases of both add/remove links?

If so, perhaps instead structure the rule triggered and checked for only the non-bug types, so it always recounts the linked bugs, with JQL and a Lookup Issues action to get the count.

Kind regards,
Bill

Morgan DUBUISSON June 25, 2022

I agree with your analysis.


For me the rule currently is a counter that does + 1 every time it runs.


The "For current issue" says that we are only going to pass on the issue and not on the links and that we add 1.


Is it possible to write us the requirement?

 

Kind regards,

Morgan

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.
June 30, 2022

Hi @Morgan DUBUISSON 

Are you asking a different question, or are you working with Heidi on their question, or something else?

Thanks,
Bill

Morgan DUBUISSON July 1, 2022

...

 

Morgan DUBUISSON July 1, 2022


Hi @Bill Sheboy  ,
I'm here just to answer the original question.
I find your analysis good.
I ask @Heidi Smith  to write us his need so that we can reflect together on his problem.

Like Bill Sheboy likes this
0 votes
Danno
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2022

Welcome to smart values and lists. I've just spent a few days dealing with a similar problem.

I would guess your count being off by 1 is related to the default value for the custom counter field. I would verify that it is 0 or none.

I believe what is happening is that it is iterating all of the issues found in the trigger even though the logic here says it should only find the Bug issue type to use to increment the count.. I would try changing All Types to just Bug or try to use a JQL search to limit the number of issues found to just the Bugs.

Suggest an answer

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

Atlassian Community Events