Is there a way to update the component lead for a component using jira-python? When you create a component there's the 'leadUserName' param but I want to update an existing component. Thanks!
Hi Chris,
You can use rest using the call /rest/api/2/component/{id} - Using PUT you can update the fields of the component. As per https://docs.atlassian.com/jira/REST/latest/#d2e3939:
Modify a component via PUT. Any fields present in the PUT will override existing values. As a convenience, if a field is not present, it is silently ignored. If leadUserName is an empty string ("") the component lead will be removed.
For example:
{ "name": "Component 1", "description": "This is a JIRA component", "leadUserName": "fred", "assigneeType": "PROJECT_LEAD", "isAssigneeTypeValid": false }
Thanks, Matheus. Yeah, this is how I ended up implementing it but I was hoping it was possible to do this using the native python client (https://bitbucket.org/bspeakmon/jira-python)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With jira-python, you need to get a component object first:
component = jira_connection.component(id)
And then you just need to update the specific field:
component.update( fields={ "leadUserName": username } )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.