Forums

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

JIRA python Library JiraError 400: Field 'summary' cannot be set

Amit Raghuwanshi
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 7, 2020

I am trying to integrate Jira with Python using Rest API.

I am using the below mentioned code to create an issue in JIRA using Python. However I am encountering an error mentioned below.

from jira import JIRA

jira = JIRA(basic_auth=('Username,'API Token'), options={"server": "https://ProjectName.atlassian.net/"})

options={"server": "https://ProjectName.atlassian.net/"}

jira=JIRA(options)

test_case_data= {
"project": {"id": "10000"},
"summary": "test summary",
"description": "test description",
"issuetype": {'name': 'Task'},

}

 

jira.create_issue(fields=test_case_data)

 

JIRAError: JiraError HTTP 400 url: https://ProjectName.atlassian.net/rest/api/2/issue
	text: Field 'summary' cannot be set. It is not on the appropriate screen, or unknown., Field 'description' cannot be set. It is not on the appropriate screen, or unknown.

 

However, while checking the create issue screen by clicking on create I see all these fields visible. Please help in resolving this. I have read on other posts that this could be some authentication issue and the error might be misleading, But not aware to resolve this.Screenshot 2020-12-07 144831.png

1 answer

0 votes
Hana Kučerová
Community Champion
December 7, 2020

Hi @Amit Raghuwanshi ,

welcome to the Atlassian Community!

I believe the problem is your test_case_data is not in the correct format, it should look like this, see here:

{
"fields": {
"summary": "test summary",
"issuetype": {
"id": "10000"
},
"project": {
"id": "10000"
},
"description": "test description"
}
}
Amit Raghuwanshi
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 17, 2020

Thanks for your reply, I have found the resolution:

1. Error message was misleading

2. issue actually lied with the authentication credentials, once I fixed those, it started working smoothly.

Suggest an answer

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

Atlassian Community Events