pycontribs / jira

Python Jira library. Development chat available on https://matrix.to/#/#pycontribs:matrix.org
https://jira.readthedocs.io
BSD 2-Clause "Simplified" License
1.96k stars 874 forks source link

Incorrect key in `incompletedIssuesEstimateSum()` #1140

Open dakindre opened 3 years ago

dakindre commented 3 years ago

https://github.com/pycontribs/jira/blob/fe78ddd99a6a8f738cc50b996259b27954b192c8/jira/client.py#L4402

I noticed that the jira.client.incompletedIssuesEstimateSum method fails with KeyError: 'incompletedIssuesEstimateSum'. At the moment the code looks for the nesting ['contents']['incompletedIssuesEstimateSum']['value']

It seems like the value that it should be set to is ['contents']['issuesNotCompletedEstimateSum']['value'] which exists

bhadreshpsavani commented 2 years ago

Can I make these changes?

adehad commented 2 years ago

Gave this a look, and after changing the default agile endpoint this doesn't work for me in the test server.

We probably need to migrate to using the following endpoints:

https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-rest-agile-1-0-board-boardid-sprint-sprintid-issue-get

https://docs.atlassian.com/jira-software/REST/7.3.1/#agile/1.0/board/{boardId}/sprint-getIssuesForSprint

But not sure if the remainingEstimate is the matching key for this?