Hi,
In our company jira we have two custom post functions, which run after each other. The first one calls an external api and sets a custom field based on the returned value.
The second post function needs to retrieve the value in the custom field.
My problem is that when the functions are triggered, the first function writes the value, but in the second function i get null when I read that custom field.
The value is shown in the issue overview after the functions are run.
Relevant code:
Function 1, setting the value
customField.updateValue(
null,
issue,
new ModifiedValue<>("", String.valueOf(response.getData().getTaskId())),
new DefaultIssueChangeHolder()
);
Function 2, retrieving the value
CustomField customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(customFieldId);
Object value = task.getCustomFieldValue(customField); // null
Thanks in advance.