Forums

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

Getting an error while creating a JIRA issue, in JIRA Python

ajay chhokar
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!
December 18, 2018
def create_issue(self, project_key, summary, description):
upload_fields = {
"project": {"key": project_key},
"summary": summary,
"description": description,
"issuetype": {"name": "Bug"}
}

issue = self.jira.create_issue(fields = upload_fields)

 

jira.exceptions.JIRAError: JiraError HTTP 400 url: https://issues.labcollab.net/rest/api/2/issue

text: Reproducibility is required., Environmental Stage is required., IsRegression is required.

 

response headers = {'X-Seraph-LoginReason': 'OK', 'Connection': 'keep-alive', 'Content-Type': 'application/json;charset=UTF-8', 'X-XSS-Protection': '1; mode=block', 'X-AREQUESTID': '1314x51968555x7', 'X-Frame-Options': 'SAMEORIGIN', 'X-ASESSIONID': 'j3pbrl', 'transfer-encoding': 'chunked', 'X-Content-Type-Options': 'nosniff', 'X-AUSERNAME': 'bot-freetime-jiraupdater', 'X-ANODEID': 'issues-p-atl-us-east-1a-1', 'Content-Security-Policy': "frame-ancestors 'self'", 'Date': 'Tue, 18 Dec 2018 21:54:53 GMT', 'Cache-Control': 'no-cache, no-store, no-transform', 'X-ASEN': 'SEN-XXXXXX'}

response text = {"errorMessages":[],"errors":{"customfield_14601":"Environmental Stage is required.","customfield_10003":"Reproducibility is required.","customfield_11301":"IsRegression is required."}}

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 28, 2018

Hello Ajay,

The errors you are reporting seem to be fields that are required. They’re most likely set to required based on the issue type itself (in this event, bug). Within your issue creation script, you will need to set those fields with a value in order to create your issue.

You may find more about required fields within Jira at Specifying field behavior.

I hope this helps to resolve your issue along with progressing forward with creating your issue from Python.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events