Hello everyone,
I am trying to set up an automation that place a comment on the task when it is assigned to a reviewer (custom field People already created).
The Reviewer shows me:
data-testid="issue-field-heading-styled-field-heading.field"
instead other custom field shows me the ID:
data-testid="issue-field-heading-styled-field-heading.customfield_11736"
The automation is working, so it stamps a comment but with no tag of the reviewer, it's useless.
Here the rule:
If you check the layout, the name of the reporter is smaller that the Assignee.
Hi @Giulia Quaglia -- Welcome to the Atlassian Community!
Are you using a Company-managed or a Team-managed project? You may find that information at the lower-left of the expands area of the screen.
To mention someone in a comment (or other text field), please use this format, substituting in your custom field information:
Here is my mention [~accountid:{{issue.yourCustomField.accountId}}]
Kind regards,
Bill
Hi Bill,
at the moment we are using a team-managed project.
Maybe this setting is not working properly, I've already checked that we have restricted possibility to customize the project.
Here below the screenshot:
I've tried to use:
- {{issue.customfield_XXXXX}}
- {{issue.fields.customfield_XXXXX}
- {{issue.yourCustomField.accountId}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for confirming your project type as there are known problems with accessing the People fields in team-managed projects to send notifications. Here are a couple of the defects/suggestions around that symptom:
https://jira.atlassian.com/browse/JSWCLOUD-20774
https://jira.atlassian.com/browse/AUTO-519
I am going to experiment with this a bit to see if I can find a work-around.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Giulia Quaglia - welcome to the Community!
It sounds like the reason you're unable to make this work is that you don't know the custom field ID of your Reviewer field. If you're not a Jira admin, the easiest way to get that value is to look at an issue you have access to (with a value in the field) via the API.
Just put this in your browser's URL bar:
https://<your-site>.atlassian.net/rest/api/3/issue/TRAS-4254?expand=names
Replace <your-site> with your actual site URL, and replace TRAS-4254 with your ticket number. Hit enter, and it will give you a screenful of unformatted json data. You can use any program you like that will format json (Notepad++, etc.) or paste it into the text screen at https://jsonviewer.stack.hu/. Then click to the Viewer screen to view your ticket data as a formatted tree. Go to the names section and find the ID that matches your field name. For example, in my screenshot, the field called Esther User Picker is customfield_10610 .
You can then use that in your automation rule as {{issue.customfield_10610}} with whatever the ID is for your field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Esther for you help! I've found the custom field ID on the JSON.
Automation with {{issue.customfield_10610}} still does not work, maybe it is related to the fact that we are in team-managed company
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Giulia Quaglia ,
from your above comment it looks like you're passing the complete field value, if this is a User related field you'll need to make thr output more specific, taking reference from @Bill Sheboy 's answer try using this as the comment (Square bracket is for tagging)
[~accountid:{{issue.customfield_10610.accountId}}]
Using user smart values: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/
----
Update: I tested this at my end, and this worked to tag the approver of my ticket, similar should work with the "People" custom field :
[~{{approval.approver.accountId}}]
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.