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.94k stars 860 forks source link

Support for issue/issueIdOrKey/changelog #911

Open cberg2048 opened 4 years ago

cberg2048 commented 4 years ago

I am unable to get the full changelog of an issue. Currently issue?expand=changelog supplies the most recent 100 histories and there is no pagination supported.

Support for the below functionality would be ideal:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-issueIdOrKey-changelog-get

Does this already exist in some way? I am having difficulty finding it.

Addono commented 4 years ago

Seems new in the v3 API (at least it's not available in the latest Jira Server REST API reference) and I cannot find anything which would implement support for this API endpoint.

jpsilvagallino commented 4 years ago

Hi!,

I´m also interested in this. Any plans on adding it to the roadmap? Thanks.

Addono commented 4 years ago

Responding out of courtesy, cannot do much right now.

Progress has pretty much stalled (see #896 #909). Top priority on the roadmap is getting the CI to work again and be able to start accepting features. However, this isn't trivial (self hosted vs. cloud hosted Jira instances have APIs which started to diverge during the time the CI was broken) and no one has stepped up yet to take on this task 😐 .

jpsilvagallino commented 4 years ago

Thanks, Addono. Sorry to hear. I'm not much of a python programmer to be able to lend a hand.

kadimgh commented 2 years ago

I'm using the following at the moment:

from jira import JIRA
from jira.resources import Resource

class JiraChangelog(Resource):

    def __init__(self, options, session, raw=None):
        Resource.__init__(self, "issue/{0}/changelog/{1}", options, session)
        if raw:
            self._parse_raw(raw)

# add changelogs function that loads all the changelogs using paging
# if the original JIRA class ever adds this method then I could switch to using it instead
class JiraEx(JIRA):

    def changelogs(self, issue_key):
        return self._fetch_pages(JiraChangelog, "values", "issue/%s/changelog" % issue_key, maxResults = False)
pavelklymenko commented 1 year ago

@kadimgh thanks for posting this. It’s kinda work but throws an error for me (Jira Datacenter).