I am using ScriptRunner (4.3.12) with JIRA Software (7.1.7) to set a multiple line text field value to a simple string in a post function. The script is
def customFieldManager = ComponentAccessor.getCustomFieldManager() def orderFailReasonField = customFieldManager.getCustomFieldObjectByName("my test field") def issueInputParameters = issueService.newIssueInputParameters() issueInputParameters.setComment("xxx") issueInputParameters.addCustomFiedlValue(orderFailReasonField.getId(), ["test reason"] as String) issueInputParameters.setSkipScreenCheck(true) ...
However line 5 failed due to
groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.issue.IssueInputParametersImpl.addCustomFiedlValue() is applicable for argument types: (java.lang.String, [Ljava.lang.String;) values: [customfield_10310, [test reason]] Possible solutions: addCustomFieldValue(java.lang.String, [Ljava.lang.String;), addCustomFieldValue(java.lang.Long, [Ljava.lang.String;), getCustomFieldValue(java.lang.String)
I also tried to use
issueInputParameters.addCustomFiedlValue(orderFailReasonField.getIdAsLong(), ["test reason"] as String)
issueInputParameters.addCustomFiedlValue(orderFailReasonField.getId(), "test reason")
and got similar exception.
Anyone can help? Thanks.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :). In the spirit of this month's august-challenge, we're sourcing stories of Jira Service Desk activation fro...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs