The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

create new issue in a sprint from python jira rest api

Thulasi_savedroid
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!
September 23, 2019

 

def lambda_handler(event, context):
event_body = json.dumps(event, indent=2)
summary = event['detail-type'] + event['detail']['type']
issue_dict = {
'project': {'id': 10000},
'summary': summary,
'description': event['detail']['description'],
'issuetype': {'name': 'Bug'},
"customfield_10009": 19
}
new_issue = jira.create_issue(fields=issue_dict)

comment = jira.add_comment(new_issue, event_body)

print("Created new issue and added the :", new_issue)

 

https://confluence.atlassian.com/jirakb/creating-an-issue-in-a-sprint-using-the-jira-rest-api-875321726.html

 

followed above link and it says 

 

"errorMessages":[],"errors":
{"sprint":"Field 'sprint' cannot be set. It is not on the appropriate screen, or unknown."}

also when tried

/rest/agile/1.0/board/{boardId}/sprint


to get sprint id i get


{
  • errorMessages:    [
    • "The board does not support sprints"
    ],
  • errors: { }
}

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
robert Mugabuhamye
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 Champions.
September 23, 2019

Hello @Thulasi_savedroid '

 

From the message error you posted, it seems like the sprint field is not on the create issue screen of your Bug.

Regards

TAGS
AUG Leaders

Atlassian Community Events