Increment Count Doesn't Work

r2d2 May 11, 2023

On Jira, I have a field called re-opened count which in essence every time the bug is re-opened the count increments however I've noticed this only works if it doesn't have a count present once we hit the count of of 1 this no longer works. Any ideas why this is?

 

The code is as follows: - 

 

{{#=}}{{customfield_10401}} + 1{{/}}

1 answer

0 votes
Alex Koxaras _Relational_
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 11, 2023

Hi @r2d2 

This rule should work fine without any problem. I've tested it and it's fine. Can you use instead of the customfield id, the field's name? E.g. I used 

{{#=}}{{Number}} + 1{{/}}

Or you can use as well:

{{issue.Number.plus(1)}}
Kelly Arrey
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 11, 2023

@r2d2 Is this an automation rule? If so, how is it triggered? 

r2d2 May 11, 2023

Yes its an automated rule, changes based on status changes e.g. will update when moving from closed to reopen or rejected to reopen.

r2d2 May 11, 2023

I've used the following code but once the increment moves to 1 it doesnt move to 2 

{{#=}}{{Number}} + 1{{/}}
Alex Koxaras _Relational_
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 11, 2023

@r2d2 can you share a screenshot of your code and to describe what do you do and you expect it again to increase by 1?

r2d2 May 16, 2023

The code is as follows

{{#=}}{{customfield_"enter project id here"}} + 1{{/}}

 

{{#=}}{{customfield_12345}} + 1{{/}}

Suggest an answer

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

Atlassian Community Events