Hi,
I am looking to create an automation rule that would tag (@) the previous assignee of the issue in a comment. To trigger this rule, the ticket must be "blocking" another ticket. This blocking rule is based on the out of the box issue link of blocks/blocked by.
Example:
Currently, I am able to do the following using automation:
My comment log smart value is {{#changelog.status}}{{fromString}}{{/}}.
Any ideas?
thank you!
Dylan
Hi @Dylan Brock,
To mention someone in the comment, the syntax is [~accountid:thePersonsIdNumber]. You have mentioned the following:
- Determine the previous assignee and comment their name but only in plain text, not as a shoutout(@)
Can I know how you are getting this value?
Thanks,
Moga
Yep Moga has the solution here. To get the account id, you should be able to use:
{{#changelog.assignee}}{{from}}{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tried using {{#changelog.assignee}}, and it only worked if the assignee had changed as part of whatever triggered the rule. I don't see an assignment change in Dylan's original rule, so I too was wondering how they were able to get that value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey All!
Thanks for the responses. I am realizing I pasted the wrong syntax above, so my apologies. I am using:
[~assignee.accountId:{{#changelog.assignee}}{{accountId}}{{fromString}}{{/}}]
this produces the @ user which is a dead end when clicked. This is what I am trying to fix
I should be clear as well, I am NOT looking to tag a specific user ID, I am looking to parse the changelog to tag the previously assigned user.
@mogavenasan I was able to get the system to comment the previously assigned user by doing exactly what @Mark Chaimungkalanont suggested:
{{#changelog.assignee}}{{fromString}}{{/}}
This did not require the assignee to change as part of the rule, however.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
The reason why I was curious about how we are getting the previous assignee information is that according to Smart values - general:
Available properties
I don't see the changelog.assignee here.
If you edit the comment and view it in Text mode, do you see anything wrong with the content? Maybe we can reverse engineer this and see what we can do about it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here you can see the difference. The "user" is what the automation creates, the blue bubble is my manual add for context and to see the difference.
I agree, I noticed assignee was not shown as possible, but because I have been able to identify the previous user (though only as plain text) I had hoped it was possible to jig together.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Dylan - can you please send a screenshot of your rule? I've repeatedly been unable to get either the accountID or displayname of the Previous Assignee using any of the code you posted:
{{#changelog.assignee}}{{fromString}}{{/}}
OR
{{#changelog.assignee}}{{from}}{{/}}
What I'm wondering is whether in fact, you're not actually getting that value at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only way I was able to get the Previous assignee to show up in a Comment (or the log) was to add the Assignee field to the screen used in the Completed transition, and then change the assignee.
But at any rate, it looks like Automation is not properly interpreting Smart Values inside of the brackets, so the @ mention thing is not going to work regardless of whether we can figure out how to find Previous assignee for you.
Here's what I had in the rule to add a comment:
Previous assignee (changelog):
[~assignee.accountId:{{#changelog.assignee}}{{from}}{{/}}]
Username: {{#changelog.assignee}}{{fromString}}{{/}}
AccountId: {{#changelog.assignee}}{{from}}{{/}}
Blocking ticket is Completed
And here's the resulting comment:
Moga, Mark: do you have any other ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe the correct syntax to mention someone is [~accountid:thePersonsIdNumber]. Can you try the following:
Previous assignee (changelog):
[~accountid:{{#changelog.assignee}}{{from}}{{/}}]
If this still does not work, for the sake of testing - hard code the account ID and see how the comment will turn up.
Have you verified the account ID - is it a valid ID and points back to the correct username?
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.