Skip to content

Commit

Permalink
[Jira] add update_component method (#1322)
Browse files Browse the repository at this point in the history
* [Jira] update_component method
  • Loading branch information
jyaguem authored Feb 2, 2024
1 parent 1cd9f34 commit cb65460
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,11 @@ def create_component(self, component):
url = "{base_url}/".format(base_url=base_url)
return self.post(url, data=component)

def update_component(self, component, component_id):
base_url = self.resource_url("component")
url = "{base_url}/{component_id}".format(base_url=base_url, component_id=component_id)
return self.put(url, data=component)

def delete_component(self, component_id):
log.warning('Deleting component "%s"', component_id)
base_url = self.resource_url("component")
Expand Down
3 changes: 3 additions & 0 deletions docs/jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ Manage components
# Create component
jira.create_component(component)
# Update component
jira.update_component(component, component_id)
# Delete component
jira.delete_component(component_id)
Expand Down

0 comments on commit cb65460

Please sign in to comment.