Hello All,
I am writing a python application to automatically create Jira issues, and am running into an issue with a required custom field that contains two parts.
The custom field is called 'Program' and is identified as 'customfield_14700'. When you choose the value / option for the Program field (ie. 'Pearl'), there is a second box next to it that is a sub-option (ie. G3 - SW).
When you query the value of the custom field :
> ticket_obj = jira.issue('MD-7347')
> print ticket_obj.fields.customfield_14700 Result :
> Pearl - G3 - SW
I am using a dictionary to build the create issue request, but am having a problem with the custom field. So far I have :
issue_dict = {
'project':{'key':'MD'},
'summary':'Automated Issue : This is a test',
'description':'Sample description of the issue.',
'issuetype':{'name':'Bug'},
'customfield_14700':{'0':'Pearl', '1':'G3 - SW'}
}
new_issue = jira.create_issue(fields=issue_dict)
I know the above customfield_14700 is wrong; it is the closest I can seem to find based on other similar questions.
I get the following when executing :
response text - {"errorMessages":[],"errors":{"customfield_14700":"Could not find valid 'id' or 'value' in the Parent Option object."}}
I am hoping I am missing something obvious; but am at a loss right now.
Has anyone encountered this scenario / have any thoughts on how to populate values into a two part custom field?
Appreciate any help / suggestions.
Thanks!
Dan.