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 873 forks source link

Issue createmeta will fail from Jira 9+ #1462

Open Ry-DS opened 2 years ago

Ry-DS commented 2 years ago

Problem trying to solve

If anyone tries to use this library for the createmeta end point on a Jira server running v9+, the function will fail. Check out https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html for more details.

The culprit function: https://github.com/pycontribs/jira/blob/main/jira/client.py#L1725-1766

Possible solution(s)

You can see an example solution here: https://github.com/atlassian-api/atlassian-python-api/pull/1031

Alternatives

You will need to write your own api requests if you want to use the createmeta endpoint, as it will fail if you use the latest version of Jira.

Additional Context

No response

adehad commented 2 years ago

In addition to the deprecation warning can raise a sensible exception by checking the jira version if run on a Jira 9+

dshvedchenko commented 2 years ago

@adehad please review #1503, I'm open to discussion and implementation of all required suggestion

pmilosev commented 2 years ago

I've opened and alternative pull request, please review: https://github.com/pycontribs/jira/pull/1527