Skip to content

Commit

Permalink
Jira: add archive project method
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Feb 8, 2023
1 parent 588ccae commit 127ddde
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion atlassian/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.32.2
3.33.0
9 changes: 9 additions & 0 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,15 @@ def delete_project(self, key):
url = "{base_url}/{key}".format(base_url=base_url, key=key)
return self.delete(url)

def archive_project(self, key):
"""
Archives a project.
:param key:
"""
base_url = self.resource_url("project")
url = "{base_url}/{key}/archive".format(base_url=base_url, key=key)
return self.put(url)

def project(self, key, expand=None):
params = {}
if expand:
Expand Down
6 changes: 6 additions & 0 deletions docs/jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ Manage projects
# Returns all projects which are visible for the currently logged in user.
jira.get_all_projects(included_archived=None)
# Delete project
jira.delete_project(key)
# Archive Project
jira.archive_project(key)
# Get project
jira.project(key)
Expand Down

0 comments on commit 127ddde

Please sign in to comment.