I want to set a custom single user picker field (Reviewer) to the issue's Component Lead, as our reviewer are our component leads so Reviewer is automatically set at issue creation (can't add it from import, seems to always fail).
Is there a way to get the Component Lead user to use in an automation?
{
"fields": {
"Reviewer": "{{issue.components.????}}."
}
}
I tried saving the initial assignee, re-assigning the issue to AUTOMATIC (component lead), setting the reviewer to copy from assignee and then re-set set the assignee to the original, but its a convoluted way to get the component lead user.
It can be done, you would have to use the Get component REST endpoint to get the component lead. {{issue.components}} will give you the ID of the component. Note that your automation needs to check if there are more than one component since the field can have multiple values.
The way we have it set up, an issue won't have more than 1 component.
However, I don't really know how to use the Get Component REST endpoint as you say. My knowledge of automations is rather limited.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In it's simplest form the automation would look something like this:
Note that you should encode64 the credentials in the webhook and/or make it hidden once you verified that it is working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried to emulate what you showed and investigated some but couldn't make it work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Martin Rodriguez -
If you can screenshots of what you've tried and any error messages, that's helpful for troubleshooting.
But for a good tutorial on how to connect Automation to the REST API (including a little more details about the authentication and encoding bit, which is a bit of a hassle), I would recommend checking this out:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.