There is a problem.
I want to make rule, thet if somebody mention user in comment, this user get email with custom message.
I can take accountid from comment. But I cant take email from that accountid. It looks like a plain text.
Is there any abilities to get user email from accountid in rule?
Thanks/
Hi @Семён Жарычев -- Welcome to the Atlassian Community!
You could call the REST API with a web request using the accountId, get the email address, and then send your custom message. Please note doing this means the user would get 2 emails per mention: one from the mention and one from the rule.
If you want to try this approach, here are some references to help you get started:
https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/user-getUser
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I try this/ And for me it works well. But for other users (if in cimment mentioned not me) webhook is succesful, it can take user name, but cant take user email adress.
What could be the problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check the response from the web request to determine if it was successful. If so, try writing the response to the audit log to learn if the email address was successfully found for the user's account ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Семён Жарычев Could you show me how your's automation working? I have the same problem about mentios in automations and i can't resolve this properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LastUserCommented is a custom field with userpicker, that hidden in issue screen (both create and edit/view)
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Семён Жарычев I am following your steps, however I am not sure about the variable creation.
How did you create the "LastUserCommented" field to show in the dropdown?
My variable does not appear in the "choose fields to set" dropdown.
I am new to Automation so if you can attach a picture of how you created the variable and what you did to show in the dropdown.
All the other fields are working fine but I am not able to extract the mentioned user's email address.
{{issue.comments.last.body.substringBetween("accountid:","]")}} this returns the account id but I am not aware how to get the email from this.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you only have the accountId value, you would need to call a REST API function from the rule (with a web request) to get the email address, or other user information. That is described at the beginning of this thread.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Thank you for the details.
I will try that solution as well.
The solution proposed by @Семён Жарычев and @Szymon Cichocki worked for me at the moment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Yaseer Jawhar ,
Did you find a solution to extract email address from mentioned user, i am blocked in this point?.
Thank you very much
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.
Thnaks @Yaseer Jawhar ,
I already fixed it in otherway, for me, i just change a type of created costum field .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ABDESSAMAD JARIR Great!.
If you can post your solution here, it might help the others who come.. Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Yaseer Jawhar of course, i have just change type of my costum field to user picker (in costums fields configurations)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have only Polish version of system so i dont think my screenshots can help you.
But here you got video : https://www.youtube.com/watch?v=L1Kv3xA0TM0
And here tutorial : https://support.atlassian.com/jira-cloud-administration/docs/create-a-custom-field/
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.
Hi,
you have to create new custom field with a name "LastUserCommented" an type "user pick".
Remember to add this field to your issue screens.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Eszy
Thank you for your response, is it possible for you to post some screenshots on how to add it, it will be very helpful.
I appreciate your time.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.