Forums

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

Create issue fails with please add attachment even when attachment is not mandatory

Manoj
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!
May 8, 2020

While creating Issue using there is attachment but is not mandatory Capture-jira.JPG

https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-post

Error:

{
"errorMessages": [
"Please add the attachment"
],
"errors": {}
}

headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}

payload = json.dumps( {
#"update": {
# "attachment": open(attachment_file,"r")
#},
"fields": {
"project": {
"key": "MPM"
},
"summary": "Main order flow broken",
"issuetype": {
"name": "Bug"
},

'versions' : [{"name":"Release 2.1"}],
'customfield_17660' : 'MPM-838',
'customfield_16759': {'value':'SIT',"id":"19890"},
#'description': 'fdsfdasfsa fddsfdsfdasfdsafsdafsaddsfadsfsad'
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": jira_description[:32767],
"type": "text"
}
]
}
]
} # end of description f
} # endof fields
})

0 answers

Suggest an answer

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

Atlassian Community Events