Hi all,
I'm using ScriptRunner post function on issue transition to clone it. During the cloning I'm setting a few custom fields from script, like so:
import com.atlassian.jira.component.ComponentAccessor
def scf1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("ReQuest - Issue Type")
def scfv1 = issue.getCustomFieldValue(scf1)
def dcf1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Issue Type")
issue.setCustomFieldValue(dcf1, scfv1)
The values get set correctly and are visible in the view issue screen. However, on the Edit issue screen, their values are None. If I then accept the edit (even without changing any values) they are being set to None and disappear from the view screen.
The order of postfunctions for that transition is as follows:
- Set issue status to the linked status of the destination workflow step.
- Add a comment to an issue if one is entered during a transition.
- Update change history for an issue and store the issue in the database.
- ScriptRunner workflow function - Clones an issue, and links (condition & additional actions apply).
Issue will be cloned to project same as parent, with issue type Concept - Clear Field Value (JSU)
- Field: ReQuest - Issue Type
- Re-index an issue to keep indexes in sync with the database.
- Fire a Generic Event event that can be processed by the listeners.
Any help will be greatly appreciated.