Need to verify a field how many time it got updated

mohanbabu.s
Contributor
November 19, 2024

Hi Team,

We are using Jira cloud, we have a field called as Acceptance criteria associated to story and bugs, We need a report, how many times this field values have been updated. Please help us with a free add-on or any other options available for this activity.

 

Regards,

Mohan S

3 answers

1 vote
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2024

Hi @mohanbabu.s ,

You can also use the changelog of an issue to look the number of changes of a certain field.

With an automation rule you can 'easily' get it.

Automation rule:

Trigger: choose one of your liking (start with manual, so you can test the rule)

Action: Send web request

  • Web request URL: {{baseurl}}/rest/api/3/issue/{{issue}}/changelog
  • HTTP method: GET 
  • Web request body: Empty
  • Delay execution of subsequent rule actions: ✅
  • Headers:
    • Content-Type > application/json
    • Authorization > Basic <your token>

Action: Create variable

  • Variable name: numberOfUpdates
  • Smart value: 
    {{#=}}
    {{#webResponse.body.values}}
    {{#items}}
    {{#if(equals(field,"Acceptance criteria"))}}1{{/}}{{#if(not(equals(field,"Acceptance criteria")))}}0{{/}}
    {{^last}}+{{/}}
    {{/}}
    {{^last}}+{{/}}
    {{/}}
    {{/}}
  • Action: Comment on issue
    Number of updates of the field Acceptance criteria: {{numberOfUpdates}}

The above rule will create a comment in your issue.
You can also create a new field and use {{numberOfUpdates}} as the value.

 

Good luck,

Rudy

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.
November 19, 2024

Hi @Rudy Holtkamp 

I believe that endpoint can only return a maximum of 100 changes:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-changelog-get

And so if the issue has been changed more than 100 times and the updates of the field were before those 100 changes, pagination would be required to get an accurate count...which could be challenging to accomplish with a rule.

Kind regards,
Bill

Like # people like this
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2024

@Bill Sheboy That could become an issue, true. Maybe add ?maxResults=1000 to the endpoint?

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.
November 19, 2024

The limit for that one is maxResults=100, after which the call returns the nextPage link to follow for more results.

 

mohanbabu.s
Contributor
November 21, 2024

Hi All/ @Rudy Holtkamp , 

Our requirement is not getting completed with above scenario, we need to verfiy for a complete sprint.

 

Please help us with a different scenario or updating the existing script.

 

We have updated the script in below format:

Smart value : {{#=}} {{#webResponse.body.values}} {{#items}} {{#if(equals(field,"Acceptance criteria"))}}1{{/}}{{#if(not(equals(field,"Acceptance criteria")))}}0{{/}} {{^last}}+{{/}} {{/}} {{^last}}+{{/}} {{/}} {{/}}

 

Web request: {{https://idpchange.atlassian.net/jira}}/rest/api/3/issue/{{DTP11-49}}/changelog

 

Please let us know if there is an update.

Regards,

Mohan S

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2024

Hi @mohanbabu.s ,

You can use the automation rule to update a field in an issue. If you want to have all the Acceptance criteria summed up for all the issues in the sprint, then you should create a filter for that sprint, and show the column with the fore-mentioned field.

 

mohanbabu.s
Contributor
November 26, 2024

Thankyou @Rudy Holtkamp , I will check this option and update you

 

Regards,

Mohan S

1 vote
Tomislav Tobijas _Koios_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2024

Hi @mohanbabu.s ,

You could use 'counter'/number field to achieve this + automation rule that updates the number field value each time 'Acceptance criteria' value is changed.

So, what you can do is to set this counter number field to some value (e.g. '0') and then use smart values and math expressions to change the counter value. In the example below, a custom field with ID 10061 is actually this 'counter' number field named "Counter 'Acceptance criteria'".

2024-11-19_12-44-53.png

Hope this helps.

Cheers,
Tom

0 votes
mohanbabu.s
Contributor
November 19, 2024

Hi All thankyou for your swift support, I will check this scenario and update you if there is an issue.

 

Regards,

Mohan S

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