I am attempting to set up an automation so that when a specific canned response is used, it updates the request type and closes the ticket (for simple tasks like password reset links, etc) but my rule will run and do nothing. I've looked at a few other similar issues in the community but so far I've had no luck with those suggestions.
The comment from the canned response contains the exact phrase that I have the automation set to recognize so I am assuming I am missing something simple to get it to recognize it (change smart value condition, etc.)
I've tried {{comment.body}}, {{comment}}, {{issue.comment}} and also changing the rule to run for all comments added and not just the main action but no dice. I've also swapped my condition between contains, contains regular expression, and equals but that made no difference either.
Hi @Georgia Stangel,
Welcome to Atlassian Community!
I would recommend that you add a log action at the beginning of your rule to make sure that {{comment.body}} has the value you are looking for and then go from there.
Do I need to enable this somewhere in Jira Service Management? I've never used it before but and based on the Atlassian Documentation, Log Action is used with smart values but I only have the option to compare two values.
My View
Log Action Example from Atlassian
I am very new to Jira so I'm sorry if it's a dumb question, I just keep running into things that should work in theory but won't work the way I want to set them up with Jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, you do not have to enable it on JSM, all you have to do is add it first in your rule after the trigger component and set to something like this:
Once your automation runs, this log action will add the data to the Audit log of the rule and you can then go a check to make sure that the {{comment.body}} has the value that you expect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I do see that now, my audit log shows the exact comment that I am expecting.
I copied it verbatim from the log and put that exact phrase into my rule and I still get the response that the issue does not match the condition, but it is the exact comment I am looking for:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, I would consider redoing your automation and see if that helps. I just tested in my sandbox using both the {{smart values}} condition that you are using and the If/Else condition and in both cases the automation worked as expected and passes the condition. Here is what those two looks like:
Smart value condition
If/Else condition
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.
@Mikael Sandberg ~ 😆
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.