Creating a sprint using jira-python, with Jira JIRA Project Management Software (v7.6.2#76004-sha1: Edited

Mo Rawi I'm New Here Jan 11, 2018

Hi,

         I'm using 'jira-python' module/library to create a new sprint, the creation of the project and the Board was fine, the sprint creation seems to have issues that I'm unable to understand. Hope you can help.

Code:

 

import re
from collections import Counter
from jira import JIRA
from jira.client import GreenHopper
# Below is the code for simple connection authentication, Ideally we have a dedicated user
server = {'server': 'http://127.0.0.1:8083','verify': False, 'stream':True}

# Standard User
user = 'user01'
password = 'user01'

# Admin user
adminUser = 'jira'
adminPassword = 'jira'

jira = JIRA(options=server,basic_auth=(user, password),validate=True)

 

SprintName = "Sprint1"
SprintBoardProjID = "OVM01" ## This matches the project key, to my understanding it had to!
SprintStartDay = "2018-01-15 10:00:00-07"
SprintEndDate = "2018-03-22 18:00:00-07"
jira.create_sprint(SprintName, SprintBoardProjID, SprintStartDay, SprintEndDate)

 

Errors-List:

 

 

Traceback (most recent call last):
File "C:/Users/morris/PycharmProjects/jiraovm/JiraSprintCreator.py", line 24, in <module>
jira.create_sprint(SprintName, SprintBoardProjID, SprintStartDay, SprintEndDate)
File "C:\Users\morris\PycharmProjects\jiraovm\venv\lib\site-packages\jira\client.py", line 2926, in create_sprint
r = self._session.post(url)
File "C:\Users\morris\PycharmProjects\jiraovm\venv\lib\site-packages\jira\resilientsession.py", line 153, in post
return self.__verb('POST', url, **kwargs)
File "C:\Users\morris\PycharmProjects\jiraovm\venv\lib\site-packages\jira\resilientsession.py", line 146, in __verb
raise_on_error(response, verb=verb, **kwargs)
File "C:\Users\morris\PycharmProjects\jiraovm\venv\lib\site-packages\jira\resilientsession.py", line 56, in raise_on_error
r.status_code, error, r.url, request=request, response=r, **kwargs)
jira.exceptions.JIRAError: JiraError HTTP 404 url: http://127.0.0.1:8083/rest/greenhopper/1.0/sprint/OVM01

response headers = {'X-AREQUESTID': '603x90x1', 'X-ASESSIONID': 'st3e81', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Security-Policy': "frame-ancestors 'self'", 'X-ASEN': 'SEN-L10930323', 'X-Seraph-LoginReason': 'OK', 'X-AUSERNAME': 'user01', 'Cache-Control': 'no-cache, no-store, no-transform', 'Content-Encoding': 'gzip', 'Vary': 'User-Agent', 'Content-Type': 'text/html;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Date': 'Thu, 11 Jan 2018 10:03:22 GMT'}
response text =

Process finished with exit code 1

 

 

Any help would be greatly appreciated!

0 answers

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Schuster
Posted Mar 28, 2018 in Jira Software

Can a company’s culture make or break agile adoption?

Can a new-to-agile team survive and thrive in a non-agile culture? If so, what advice would you give to those trying to be agile in a non-agile culture? What's the key(s) to success? Share your thoug...

13,130 views 15 13
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you