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?
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.