Skip to content
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

add backward compatibility for createmeta_issuetypes & createmeta_fieldtypes #1838

Merged
merged 7 commits into from
Mar 25, 2024
Prev Previous commit
Next Next commit
Fix spelling errors, add sphinx deprecation directive
  • Loading branch information
adehad authored Mar 25, 2024
commit 008614f660c8c9a46ca81eb5b35d0bd36a0e2474
14 changes: 12 additions & 2 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2083,8 +2083,13 @@ def createmeta_issuetypes(
maxResults: int = 50,
) -> dict[str, Any]:
"""Get the issue types metadata for a given project, required to create issues.

.. deprecated:: 3.6.0
Use :func:`project_issue_types` instead.

This API was introduced in JIRA Server / DC 8.4 as a replacement for the more general purpose API 'createmeta'.
For details see: https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html

Args:
projectIdOrKey (Union[str, int]): id or key of the project for which to get the metadata.
startAt (int): Index of the first issue to return. (Default: ``0``)
Expand All @@ -2096,7 +2101,7 @@ def createmeta_issuetypes(
Dict[str, Any]
"""
warnings.warn(
"'createmeta_issuetypes' is deprected and will be removed in future releases."
"'createmeta_issuetypes' is deprecated and will be removed in future releases."
"Use 'project_issue_types' instead.",
DeprecationWarning,
stacklevel=2,
Expand All @@ -2118,8 +2123,13 @@ def createmeta_fieldtypes(
maxResults: int = 50,
) -> dict[str, Any]:
"""Get the field metadata for a given project and issue type, required to create issues.

.. deprecated:: 3.6.0
Use :func:`project_issue_fields` instead.

This API was introduced in JIRA Server / DC 8.4 as a replacement for the more general purpose API 'createmeta'.
For details see: https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html

Args:
projectIdOrKey (Union[str, int]): id or key of the project for which to get the metadata.
issueTypeId (Union[str, int]): id of the issue type for which to get the metadata.
Expand All @@ -2132,7 +2142,7 @@ def createmeta_fieldtypes(
Dict[str, Any]
"""
warnings.warn(
"'createmeta_fieldtypes' is deprected and will be removed in future releases."
"'createmeta_fieldtypes' is deprecated and will be removed in future releases."
"Use 'project_issue_fields' instead.",
DeprecationWarning,
stacklevel=2,
Expand Down
Loading