Fill custom field with jira-steps-plugin in jenkins fails with “Could not find valid 'id' or 'value' in the Parent Option object.”

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fill custom field with jira-steps-plugin in jenkins fails with “Could not find valid 'id' or 'value' in the Parent Option object.”

Adrian Wyssmann

I configured a custom field pkg in Jira of type Select List (single choice)

I would like to create an issue as follows using the jira-steps-plugin and filing the custom field with a given text, not the id of the entry, so something like this

String pkg = "Maven" customfield_15207: value: pkg,

More context

newJiraIssue = [fields:
                [ project:
                    [key: jiraProjectKey],
                    summary: issueTitle,
                    description: summary,
                    customfield_15207: pkg,
                    issuetype: [name: jiraIssueType]
                ]]

withEnv(["JIRA_SITE=${jiraSite}"]) {
    try {
        String response = jiraNewIssue issue: jiraIssue
        jiraIssueKey = response.data.key
        println "[INFO] ### issue created: ${jiraIssueKey} "
        if (isDebug) {
            echo response.data.toString()
        }
    } catch (Exception e) {
        println("[ERROR] Error creating jira Issue\n${e.getMessage()}")
        throw e
    }
}

Unfortunately this fails with

Error Code: 400 Error Message: {"errorMessages":[],"errors":{"customfield_15207":"Could not find valid 'id' or 'value' in the Parent Option object."}}

Other options I've tried, with the same outcome

String pkg = "Maven" customfield_15207: [ value: pkg ],

and

String pkg = "Maven" customfield_15207: [[ value: pkg ]],

and

String pkg = "Maven" customfield_15207: [ name: pkg ],

How can I achieve this? what do I miss?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7a322d8a-9452-4d17-88f0-36a7c6a265f5n%40googlegroups.com.