Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JMCF: use priveous field value

Leo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 6, 2020

Hello guys,

I am trying to configure a JMCF field with a groovy script. The field should have only two values - null and '1'. If this field ever had a '1' value it should have '1' value regarding any other logic. It is a read-only field. I can't find it's mention in issue history. I tried to get its value using issue.get("customfield_name") function but receive only a server error. Is there any way to get a previous value of the same field?

1 answer

1 accepted

0 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 6, 2020

Calculated fields calculate their value on the fly, and never store it. That's how Jira works. That's why you'll never see the history of the field's value in the issue history.

Also, the value is only calculated at certain points in time:

- every time the issue is displayed, or queried through the REST API

- every time an issue is modified or transitioned

- every time the issue is re-indexed (e.g. background or foreground re-indexing)

So the solution for you depends on what you're trying to achieve, and most importantly when you want to calculate the field value. If you want to calculate (and store) the field during a transition then you should use a "normal" custom field, and use a JMWE Set Field Value post-function to calculate its value.

Suggest an answer

Log in or Sign up to answer