Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

jira python transition_issue

Hi ,

 

I am trying to use the jira python to transition the ticket status from open to in progress but I have to filled in the custom field first and not too sure how to do:

 

code:

issue = jira.issue('IT-331901')

jira.transition_issue(issue, transition = "11")

 

Error Msg:

 

jira.exceptions.JIRAError: JiraError HTTP 400 url: https://to-jira-dot-sc-ats.appspot.com/rest/api/2/issue/IT-331901/transitions
text: Service Categories is required

response headers = {'Content-Type': 'application/json;charset=UTF-8', 'cache-control': 'no-cache, no-store, no-transform', 'content-security-policy': "frame-ancestors 'self'", 'scp-req-id': 'a91ee9f6f876aad61936e91f48c96d71/4597228412309443145', 'vary': 'origin, User-Agent', 'x-anodeid': 'sc-jira-app-group-2-1ntf.c.sc-jira.internal', 'x-arequestid': '344x2733582x2', 'x-asen': 'SEN-9163499', 'x-asessionid': '1fzxrgp', 'x-ausername': 'svc-ats', 'x-content-type-options': 'nosniff', 'x-frame-options': 'SAMEORIGIN', 'x-seraph-loginreason': 'OK', 'x-xss-protection': '1; mode=block', 'Via': '1.1 secproxy.sc-corp.net, 1.1 google', 'Alt-Svc': 'clear, h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'X-Cloud-Trace-Context': 'a91ee9f6f876aad61936e91f48c96d71', 'Date': 'Thu, 16 Dec 2021 05:44:24 GMT', 'Server': 'Google Frontend', 'Content-Length': '84'}
response text = {"errorMessages":[],"errors":{"customfield_23993":"Service Categories is required"}}

 

 

 

And I want to put the customfield_23993 into the code but not too sure how to do as the customer filed is service categories

and for service categories I need to select Application 

And then select apps name

1 answer

Thank you @Mohamed Benziane 

But I still have some issue with that:

Here is the jira config: 

 

jira_config.jpg

 

And my code is :

 

jira.transition_issue(issue, transition = "11", servicecategories = {"application":"Adobe Creative Cloud"})

 

 

But still got the error:

text: Service Categories is required

response headers = {'Content-Type': 'application/json;charset=UTF-8', 'cache-control': 'no-cache, no-store, no-transform', 'content-security-policy': "frame-ancestors 'self'", 'scp-req-id': 'faa94d80c53590b44daca64aaa883ade/198221689290912097', 'vary': 'origin, User-Agent', 'x-anodeid': 'sc-jira-dev-group-2-j83x.c.sc-jira.internal', 'x-arequestid': '586x1326470x1', 'x-asen': 'SEN-9163499', 'x-asessionid': 'om3rpw', 'x-ausername': 'svc-ats', 'x-content-type-options': 'nosniff', 'x-frame-options': 'SAMEORIGIN', 'x-seraph-loginreason': 'OK', 'x-xss-protection': '1; mode=block', 'Via': '1.1 secproxy.sc-corp.net, 1.1 google', 'Alt-Svc': 'clear, h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'X-Cloud-Trace-Context': 'faa94d80c53590b44daca64aaa883ade', 'Date': 'Thu, 16 Dec 2021 09:46:33 GMT', 'Server': 'Google Frontend', 'Content-Length': '84'}
response text = {"errorMessages":[],"errors":{"customfield_23993":"Service Categories is required"}}

 

 

Could you please help ?

Thanks! 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you