Hi, im trying to update a checkbox custom field that only has a value ("Lost") on a parent issues right after i update one of the epics to a particular status in our kanban board, but no matter which configuration of the "Set field value post-function" in the JMWE i use, it still never changes, in the value field i was trying something like {{targetIssue.fields["Lost"] | join("," , "Lost")}}, but no changes, i tried, also just to let the value field like "Lost" but also didnt work. what could i be doing here wrong?
As a target issue i have: issues that belong to the current issue Epic.
Field: Lost
Value: (i tried multiples as mentioned)
Please use this as a reference.
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
CustomField approvalNeeded = customFieldManager.getCustomFieldObjectByName("Approval Needed")
String value = (String) issue.getCustomFieldValue(approvalNeeded)Now, the value of Approval needed into the variable 'value' and go ahead with further coding as you required.
Here's the same script, with imports and more relaxed typing:
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def approvalNeeded = customFieldManager.getCustomFieldObjectByName("Approval Needed")
def value = issue.getCustomFieldValue(approvalNeeded)See also the examples using the OptionsManager to show you how to get the list of possible values for your select list field. https://scriptrunner.adaptavist.com/4.3.7/jira/recipes/behaviours/select-list-other.html. You probably won't need them for your use case, but you may for similar work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.