How can a counter be reset to 0.

tyrone kimble May 1, 2024

Our team is counting the amount of times an issue changes status using custom field "Number of Status Changes".  Below counter is executed whenever the status changes but is not set to 0 when new issue is selected.  Custom field counter keeps incrementing which assigns subsequent issue activations with a starting value higher than 0.

Thanks in advance.

{{#increment}}{{issue.Number Status Changes}}{{/}}

3 answers

3 accepted

1 vote
Answer accepted
tyrone kimble May 1, 2024

Setting default to zero is working.  Thanks again for your assistance.

1 vote
Answer accepted
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.
May 1, 2024

Hi @tyrone kimble 

Context is important for automation rule questions...

Did you get this solution approach / rule from a template or help article?  If so, please describe that.

When does this problem happen: for all created issues, for cloned issues, etc.?

And, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, and an image of the audit log details showing the rule execution.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

I hypothesize you are either missing a default value for your field, as John suggests, or your rule does not properly detect the initial conditions (i.e., new versus cloned issues), and so just increments.

Kind regards,

tyrone kimble May 1, 2024

Thanks for the response.  I will try setting default to 0.

Like John Funk likes this
0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 1, 2024

Hi Tyrone,

Do you have a Default value of 0 for the custom field? Try adding that and see if it solves the problem for new issues. 

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events