Hi I am trying to add an automation for automatically adding a watcher for the Issue using a custom field 'Reviewer'. I tried multiple ways but the automation isn't adding the watcher. It feels perhaps the smart value is not able to access the displayName/accountId. Can someone please help with this?
I also tried using {{issue.customfield_fieldNo}} but that didn't work. Tried {{issue.fields.Reveiwer.displayName}} that also doesn't work. Am I correctly fetching the concerned value? On clicking the paint like symbol for the customfield, I don't get suggestions like displayName/accountId (I don't know if it should but wanted to mention it anyways).
Thank you in advance!
Hi @Harshvardhan Vala -- Welcome to the Atlassian Community!
This was not a permissions or project settings problem, but instead the wrong smart value was used.
Most rule actions with users need the accountId attribute, not the displayName one, to select a user. Thus, you could have used one of these expressions:
{{issue.customfield_12345.accountId}}
or
{{issue.customfield_12345}}
The second one works the same as the first one because smart values with multiple attributes (e.g., a user) have a default attribute which is used when you do not specify one. For users, that is the accountId. To avoid confusion for other people reading your rules in the future, or any changes in Atlassian's definition of the defaults, I recommend explicitly selecting the attribute needed.
Kind regards,
Bill
Hi, use {{issue.Reviewer}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Harshvardhan Vala
I tried your smart value ({{issue.customfield_id}} and {{issue.fields.myPeopleCustomField}}), it worked on my end. I think permission to "manage watcher" is missing for the automation actor. Check your project permissions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thanks @abelalia87
Tried {{issue.Reviewer}} on another project and it worked. Must be some project related settings.
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.