Hi I am getting below exception when trying to update a custom field ( "Customer Request Type" - [cf12500]) after create JIRA ticket.
<class 'jira.exceptions.JIRAError'>
(400, "Field 'status' cannot be set. It is not on the appropriate screen, or unknown., Field 'customfield_12500' cannot be set. It is not on the appropriate screen, or unknown.",
below is the python code:
def createJIRASession(user,passwd):
jira=JIRA(server="https://myJIRAServer.com/issues/",basic_auth=(user,passwd))
return jira
def updateJIRATicket(jira,tkt_number):
try:
'''issues = jira.search_issues(f'key = "{tkt_number}"')
'''
flds = {
'components' : [{'name' : 'FCS'}],
'labels' : [{'name' : 'FCS Monitoring'}],
"priority" : "Major",
"status" : "Ready",
"customfield_10702" : "GRS",
"customfield_12500" : [{"name":"Troubleshooting"}]
}
#fields['components'] = [{'name' : 'FCS'}]
issue = jira.issue(tkt_number)
issue.update(fields=flds)
except Exception as inst:
print("Exception")
print(type(inst)) # the exception instance
print(inst.args) # arguments stored in .args
print(inst)
finally:
return issue