Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Python API failing to create a ticket

Mouses Stamboulian
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 27, 2023

Hello Jira team I have some code that uses Pythons Jira library wrapper to interact with Jira and Ive automated ticket generation and assignments etc ... this code has been working for a solid year now and all of a sudden it started breaking, im getting the following message:

response text = {"errorMessages":["Enterprise Squad: Enterprise Squad is required."],"errors":{}}

 

here's the complete error stack 

```

Traceback (most recent call last):
File "/app/run.py", line 124, in <module>
assignee)
File "/app/merge_to_jira.py", line 151, in create_jira_ticket
issuetype={'name': 'Story'})
File "/opt/conda/lib/python3.7/site-packages/jira/client.py", line 1448, in create_issue
r = self._session.post(url, data=json.dumps(data))
File "/opt/conda/lib/python3.7/site-packages/jira/resilientsession.py", line 198, in post
return self.__verb("POST", str(url), data=data, json=json, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/jira/resilientsession.py", line 189, in __verb
raise_on_error(response, verb=verb, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/jira/resilientsession.py", line 70, in raise_on_error
**kwargs,
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://guardanthealth.atlassian.net/rest/api/2/issue
text: Enterprise Squad: Enterprise Squad is required.

response headers = {'Date': 'Fri, 27 Jan 2023 19:07:34 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Server': 'AtlassianEdge', 'Timing-Allow-Origin': '*', 'X-Arequestid': '8f716b5542a259a0c698aae5621e6879', 'X-Aaccountid': '625ee5a260d67c0068d8434b', 'Cache-Control': 'no-cache, no-store, no-transform', 'Expect-Ct': 'report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/atlassian-proxy", max-age=86400', 'X-Content-Type-Options': 'nosniff', 'X-Xss-Protection': '1; mode=block', 'Atl-Traceid': 'aa24c15847fe6ea8', 'Report-To': '{"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}', 'Nel': '{"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload', 'Transfer-Encoding': 'chunked'}
response text = {"errorMessages":["Enterprise Squad: Enterprise Squad is required."],"errors":{}}

```

Have you guys changed anything on your end? Please help.

2 answers

0 votes
Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2023

You seem to have a required field on the issuetype you're using to create as shown by the error message. 

 "Enterprise Squad: Enterprise Squad is required."

 You should check your field configuration or workflow validator for that field.

0 votes
Trudy Claspill
Community Champion
January 27, 2023

hello @Mouses Stamboulian 

That error is not due to a change made by Atlassian.

The error message indicates that the Enterprise Squad field must be filled in when creating the issue, for the issue type you are creating in the project where you are creating it.

That requirement may have been set in the Field Configuration, or it may have been added to the Workflow as a Validator when the issue is created. In either case, that is a requirement that would have been implemented by the administrators of your Jira system.

You need to check with the administrators of the project and of your Jira system to find out why that change was made.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events