*** JIRA Version 7+ ***
I am trying to determine how to use Scriptrunner to set the assignee during a transition, using a post function, where several separate custom fields impact who the assignee will be.
The first thing that needs to happen is that a single-select drop-down custom field is checked to determine its value (e.g. Option A, Option B, Option C, Option D).
- Let's call this cfDropDown.
Next, a checkbox custom field is used to determine if it has a value or is null.
- Let's call this cfCheckBox.
Next, a single-select entry text field is used to determine what its value is (e.g. 1, 2, or null).
- Let's call this cfSingleEntry.
Finally, a mapping occurs between that field value and other custom fields. For example,
- IF cfDropDown = "Option A" AND cfCheckBox = "2" AND cfSingleEntry = "Dogs" THEN assign the issue to the value of a custom User Picker field called "Engineer"
- IF cfDropDown = "Option A" AND cfCheckBox = "null" AND cfSingleEntry = "Cats" THEN assign the issue to the value of a custom User Picker field called "Artist"
- IF cfDropDown = "Option C" AND cfCheckBox = "2" AND cfSingleEntry = "null" THEN assign the issue to the value of a custom User Picker field called "Mechanic"
- etc.
- etc.
I hope this makes sense, and thank you in advance for your support!