Skip to content

Commit

Permalink
adding version to documentation to help out on #1016
Browse files Browse the repository at this point in the history
  • Loading branch information
Neefs, Jef committed May 13, 2021
1 parent 4355170 commit 2a69f50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ Comment

.. autoclass:: Comment

Version
=======

.. autoclass:: jira.resources.Version

Worklog
=======

Expand Down
15 changes: 11 additions & 4 deletions jira/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,10 +879,11 @@ def __init__(self, options, session, raw=None):
self._parse_raw(raw)

def delete(self, moveFixIssuesTo=None, moveAffectedIssuesTo=None):
"""Delete this project version from the server.
"""
Delete this project version from the server.
If neither of the arguments are specified, the version is
removed from all issues it is attached to.
If neither of the arguments are specified, the version is removed from all
issues it is attached to.
:param moveFixIssuesTo: in issues for which this version is a fix
version, add this argument version to the fix version list
Expand All @@ -899,7 +900,13 @@ def delete(self, moveFixIssuesTo=None, moveAffectedIssuesTo=None):
return super(Version, self).delete(params)

def update(self, **args):
"""Update this project version from the server. It is prior used to archive versions."""
"""
Update this project version from the server. It is prior used to archive versions.
link to atlassian restapi `documentation`_.
.. _doc: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-versions/#api-rest-api-2-version-id-get
"""
data = {}
for field in args:
data[field] = args[field]
Expand Down

0 comments on commit 2a69f50

Please sign in to comment.