How can I use automation to update a field with a comment and get the text name, not ID of someone mentioned in the comment using the "@" function to reference someone. I'm not talking about the person making the comment, I'm talking about a person (or persons) who was mentioned in the body of the comment
I have an Automation Rule which populates a Custom Field called LastComment with the msart value of {{issue.comments.last}}.
This works fine, except that when someone is mentioned in the comment, it shows up something like this: [~accountid:70121:76e8071e-e445-4674-b7a3-e17c64eb6757] in my custom field LastComment
Is there a way that I can get that mentioned person to have their name shown, not their ID?
Hi @Cash Coyne
Can you try {{issue.comments.body.last}} on your field and let me know the outcome? I've tried it on my instance and the result I have is to copy the last comment exactly as is. I mean e.g.:
Comment: "Hi @Cash Coyne please check this out!"
Then using the {{issue.comments.body.last}} on a multi line text field will be the exact same text/comment: "Hi @Cash Coyne please check this out!"
What type is your field? Text?
And another thing you could do is to get the person's id from a smart value, using the following {{issue.comments.last.body.substringBetween("[~accountid:","]")}}, and use it on a user field. Then re-fetch the data and then copying the new user field onto your text field. But this would increase the processing time of your rule to approximately 4-5 secs. Which is a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked. THanks @Alex Koxaras -Relational- !
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 @Cash Coyne
Please refer to this post where a workaround was mentioned.
Hope this helps.
Thanks,
Vamsi
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.