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

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
Community showcase
Published Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,517 views 10 12
Read article

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