JMWE Data Center: Set Issue Fields post-functions stop working with Scriptrunner Issue Picker fields after a JMWE update
Problem
After upgrading JMWE to 8.7.0 or 9.0.0, the Set Issue Fields post function no longer sets values in Scriptrunner’s Issue Picker fields.
Solution
There was a breaking change in how JMWE sets values in a Scriptrunner issue picker field. In versions previous to 8.7.0, JMWE set the field value using an issue key passed as a String object. In JMWE 8.7.0 and newer, an undocumented change causes the post function to only work when using a Jira Issue object instead. This is due to an Atlassian change in how issue data is accessed.
For example, if your code previously looked like this:
return "TEST-1"You will need to change the code to this:
import com.atlassian.jira.component.ComponentAccessor
def issueManager = ComponentAccessor.getIssueManager()
return issueManager.getIssueObject("TEST-1")This issue only applies to versions 8.7.0 and 9.0.0; 9.1.0 onwards reverts this behavior and adds support for copying raw values.