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."}}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.