Skip to content

[Jira] add update_component method #1322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
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
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 @@ -498,6 +498,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