Skip to content

Commit 6cfe0ee

Browse files
author
Gonchik Tsymzhitov
committed
Merge branch 'master' of https://github.com/atlassian-api/atlassian-python-api into master
2 parents 8a6bb8a + cc8a118 commit 6cfe0ee

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

atlassian/jira.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,19 @@ def add_version(self, project_key, project_id, version, is_archived=False, is_re
15851585
}
15861586
return self.post("rest/api/2/version", data=payload)
15871587

1588+
def delete_version(self, version, moved_fixed=None, move_affected=None):
1589+
"""
1590+
Delete version from the project
1591+
:param int version: the version id to delete
1592+
:param int moved_fixed: The version to set fixVersion to on issues where the deleted version is the fix version.
1593+
If null then the fixVersion is removed.
1594+
:param int move_affected: The version to set affectedVersion to on issues where the deleted version is
1595+
the affected version, If null then the affectedVersion is removed.
1596+
:return:
1597+
"""
1598+
payload = {"moveFixIssuesTo": moved_fixed, "moveAffectedIssuesTo": move_affected}
1599+
return self.delete("rest/api/2/version/{}".format(version), data=payload)
1600+
15881601
def get_project_roles(self, project_key):
15891602
"""
15901603
Provide associated project roles

0 commit comments

Comments
 (0)