0

I am using the jira-python library to create an issue in JIRA. However I cannot get the syntax right for setting Cascading Select values. The code below creates an issue and works for the first(parent) select in the cascading select but not the second (child). Can anyone tell me what I'm missing?

from jira import JIRA
jira = JIRA(options,basic_auth=('auth_email','auth_pw'))

issue_dict = {
        'project': {'key': 'AT'}, #key for project
        'summary': 'Summary Message',
        'description': 'Not important',
        'issuetype': {'name': 'Bug'},
        'customfield_10207':{'value': 'test val2'}, #Updates first cascading select
        'customfield_10207+1':{'value': 'test test2'}, #Fails
    }
    new_issue = jira.create_issue(fields=issue_dict)

(customfield_10207, customfield_10207+1 is the cascading select). Problem is with customfield_10207+1 which I expected to correspond to the second select list.

dredbound
  • 1,579
  • 3
  • 17
  • 27

1 Answers1

1

Looking at some atlassian forum docs you need to do the following:

{
    "update" : {
        "customfield_11272" : [{"set" : {"value" : "External Customer (Worst)","child": {"value":"Production"}}}]
    }
}

Apparently the + and : syntax doesn't work :(

Update:

Adding the actual solution:

issue_dict = { 'project': {'key': 'AT'}, 'customfield_10207 : {"value" : "test val2","child": {"value":"test test2"}}, }
favoretti
  • 29,299
  • 4
  • 48
  • 61
  • Almost the answer I needed, but it did lead me to the right solution. Here is what I needed to do in case anyone else is having this problem: issue_dict = { 'project': {'key': 'AT'}, 'customfield_10207 : {"value" : "test val2","child": {"value":"test test2"}}, } – dredbound Feb 21 '17 at 19:49