I need to copy value of a custom field into another customfield.
I tried this.
CustomField cf1 = cfManager.getCustomFieldObject(11419)
CustomField cf2 = cfManager.getCustomFieldObject(10204)
issue.setCustomFieldValue(cf2,issue.getCustomFieldValue(cf1))
But setCustomFieldValue function makes changes only in the issue object here but changes are not reflected in database. How can I achieve this?