atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

[Jira] get_issue_changelog broken? #1396

Open JohnStrunk opened 1 month ago

JohnStrunk commented 1 month ago

I recently updated from 3.41.11 to 3.41.13, and now I'm having problems w/ get_issue_changelog.

It looks like #1375 changed the endpoint that is used, and I've started getting 404 from my Jira server.

Call: client.get_issue_changelog("PROJ-123")

Response info:

{'message': 'null for uri: '
            'https://myserver.com/rest/api/2/issue/PROJ-123/changelog',
 'status-code': 404}

Jira server: v9.12.7

gonchik commented 1 month ago

@JohnStrunk as I see made mismatch. let me wrap that part

        """
        Get issue related change log
        :param issue_key:
        :param start: start index, usually 0
        :param limit: limit of the results, usually 50
        :return:
        """
        base_url = self.resource_url("issue")
        url = "{base_url}/{issue_key}?expand=changelog".format(base_url=base_url, issue_key=issue_key)
        params = {}
        if start:
            params["startAt"] = start
        if limit:
            params["maxResults"] = limit
        return (self.get(url) or {}).get("changelog", params)
gonchik commented 1 month ago

There I will adjust it https://github.com/atlassian-api/atlassian-python-api/pull/1398