How to decrement a custom field

Todd Winton July 14, 2015

I would like to decrement the value in a custom field via post function.  I have found the ability to increment by 1 unit (by addon I believe), but not decrement.  

I have tried this using a groovy script post function but believe this is not correct:

 

issue.get(“customField_10426”) = issue.get(“customField_10426”) - 1

4 answers

0 votes
Mark McCormack (Adaptavist)
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.
October 5, 2015

Converting Jamie's comment to an answer:

it's helpful to use that tag, otherwise you will get answers for groovy... JMWU tacks on some extra methods that aren't in the API.

0 votes
JamieA
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.
July 15, 2015

it's helpful to use that tag, otherwise you will get answers for groovy... JMWU tacks on some extra methods that aren't in the API.

0 votes
Todd Winton July 15, 2015

Yes.

0 votes
JamieA
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.
July 14, 2015

this is using jira misc workflow utils?

Suggest an answer

Log in or Sign up to answer