I have a date picker customfield and used below code to create/update it is value,
CustomField customField1 = customFieldManager.getCustomFieldObject("customfield_13961");
FieldLayoutItem fieldLayoutItem = ComponentManager.getInstance().getFieldLayoutManager().getFieldLayout(issue).getFieldLayoutItem(customField1);
DefaultIssueChangeHolder issueChangeHolder = new DefaultIssueChangeHolder();
customField1.updateValue(fieldLayoutItem, issue, new ModifiedValue(issue.getCustomFieldValue(customField1),date), issueChangeHolder);
I update the custom field in Issue resolve screen. The value is not updated. ChangeItem has the entered value in OldValue, not in NewValue. No records in CustomFieldValue table.
But when I reopen it, it is updated(the same logic is called again) and displayed in issue screen.
Any ideas?