Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,19 @@ def create_project_from_raw_json(self, json):
"""
return self.post("rest/api/2/project", json=json)

def create_project_from_shared_template(self, project_id, key, name, lead):
"""
Creates a new project based on an existing project.
:param str project_id: The numeric ID of the project to clone
:param str key: The KEY to use for the new project, e.g. KEY-10000
:param str name: The name of the new project
:param str lead: The username of the project lead
:return:
"""
json = {"key": key, "name": name, "lead": lead}

return self.post("rest/project-templates/1.0/createshared/{}".format(project_id), json=json)

def delete_project(self, key):
"""
DELETE /rest/api/2/project/<project_key>
Expand Down