jira-client
jira-client copied to clipboard
Updating issue field value with type 'any' fails
For an issue, try to set the 'Epic' field which is customfield_10009
"customfield_10009": {
"required": false,
"schema": {
"type": "any",
"custom": "com.pyxis.greenhopper.jira:gh-epic-link",
"customId": 10009
},
"name": "Epic Link",
"key": "customfield_10009",
"operations": [
"set"
]
},
Custom field metadata was obtained from https://somename.atlassian.net/rest/api/2/issue/SAMPLE-2/editmeta
The below code is able to retrieve an issue's epic, but not set it:
Issue issue = jira.getIssue("SAMPLE-2");
def epic = issue.getField('customfield_10009')
println "issue's epic: ${epic}"
issue.update()
.field('customfield_10009', 'SAMPLE-4')
.execute()
The update throws the following exception:
Caused by: java.lang.UnsupportedOperationException: any is not a supported field type
at net.rcarz.jiraclient.Field.toJson(Field.java:738)
at net.rcarz.jiraclient.Issue$FluentUpdate.execute(Issue.java:355)