0

Using python and jira==3.0.1 I receive the following error when attempting to create a sprint.

JIRAError: JiraError HTTP 500 url: https://issues.redhat.com/rest/greenhopper/1.0/sprint/10875
    text: No content to map to Object due to end of input

My code snippet follows:

jira.create_sprint(name=sprint,
                    startDate=start_dttm,
                    endDate=end_start_dttm,
                    board_id=10875
                    ) 

And I've tried with board_id=10875 where I obtained the id from https://jira.somwhere.com/secure/RapidBoard.jspa?rapidView=10875 and with board_id="PROJECT_KEY". Both return the same error.

Looking for some assistance to get past this error.

Thanks!

Eric
  • 636
  • 2
  • 9
  • 23
  • I will add that `jira.sprints(10875)` works, returning a ResultList of all sprints contained within that board_id. The sprints appear correct so I know I have the right board_id. – Eric Sep 16 '21 at 12:54

1 Answers1

0

Per response received from the github issue submitted, the following code is required: options={"agile_rest_path": GreenHopperResource.AGILE_BASE_REST_PATH}

My working code is as follows:

from jira.resources import GreenHopperResource

jira = JIRA(server="https://issues.example.com", 
            basic_auth=(os.environ.get('user'), os.environ.get('password')),
            options={"agile_rest_path": GreenHopperResource.AGILE_BASE_REST_PATH},
)

jira.create_sprint(name=sprint,
                    startDate=start_dttm,
                    endDate=end_start_dttm,
                    board_id="<board_id>"
                    ) 
Eric
  • 636
  • 2
  • 9
  • 23