Skip to content

Add new createmeta functions to comply with Jira 9 API #1031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 23, 2022
Merged

Add new createmeta functions to comply with Jira 9 API #1031

merged 4 commits into from
Aug 23, 2022

Conversation

Ry-DS
Copy link
Contributor

@Ry-DS Ry-DS commented Aug 16, 2022

This PR closes #1030

Adds new functions to maintain the same level of functionality, while also adding a deprecation warning for the old function.

To learn more about why this is needed, check out https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html

TODO:

  • May be best to use the self.resource_url function for consistency's sake

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2022

Codecov Report

Attention: Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.

Project coverage is 36.17%. Comparing base (272c7b2) to head (84d5bc5).
Report is 309 commits behind head on master.

Files with missing lines Patch % Lines
atlassian/jira.py 33.33% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1031      +/-   ##
==========================================
+ Coverage   35.97%   36.17%   +0.20%     
==========================================
  Files          35       39       +4     
  Lines        6783     6910     +127     
  Branches     1058     1073      +15     
==========================================
+ Hits         2440     2500      +60     
- Misses       4237     4303      +66     
- Partials      106      107       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1,6 +1,8 @@
# coding=utf-8
import logging
import re
from typing import Union
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does that dependency typing is built-in ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typing is built into python 3, shouldn't be an issue if it's included.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we have still python2 clients ;(

Copy link
Contributor Author

@Ry-DS Ry-DS Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should add python2 to the ci, as right now it only contains python 3. Rolled back the typing changes here: e8babc0 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main idea is remove python2 support, but time to time I receive emails ;)
That's why I have mentioned ;)

@gonchik gonchik merged commit 715c3cd into atlassian-api:master Aug 23, 2022
gonchik pushed a commit that referenced this pull request Sep 3, 2022
* Add new functions to replace deprecated stuff

* run black

* remove typing and use resource_url

* run black
@pmilosev
Copy link

@Ry-DS please see my comment here: pycontribs/jira#1527 (comment)

It looks like cloud Jira and Jira DC/Server have independent REST API and any client connecting to it should account for potential differences. Cloud JIRA still uses the createmeta endpoint and does not support the new API.
This probably doesn't affect your change here as you only added functions that use the new endpoints, but you might want to check your deprecation warning and eventually guard it with some if statements as the createmeta endpoint is not deprecated in general.

(you don't need to act on this, but since I used your PR as reference on how to implement the support in pycontrib/jira I thought sharing this info)

@gonchik
Copy link
Member

gonchik commented Nov 16, 2022

@pmilosev thanks for that mention.
I see interesting conditions related to the version checkers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue createmeta is outdated and will be deprecated
4 participants