Skip to content

Commit cb65460

Browse files
authored
[Jira] add update_component method (#1322)
* [Jira] update_component method
1 parent 1cd9f34 commit cb65460

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

atlassian/jira.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,11 @@ def create_component(self, component):
497497
url = "{base_url}/".format(base_url=base_url)
498498
return self.post(url, data=component)
499499

500+
def update_component(self, component, component_id):
501+
base_url = self.resource_url("component")
502+
url = "{base_url}/{component_id}".format(base_url=base_url, component_id=component_id)
503+
return self.put(url, data=component)
504+
500505
def delete_component(self, component_id):
501506
log.warning('Deleting component "%s"', component_id)
502507
base_url = self.resource_url("component")

docs/jira.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,9 @@ Manage components
500500
# Create component
501501
jira.create_component(component)
502502
503+
# Update component
504+
jira.update_component(component, component_id)
505+
503506
# Delete component
504507
jira.delete_component(component_id)
505508

0 commit comments

Comments
 (0)