So our Service Desk project has been configured to auto-close tickets after a set number of days if the user has not responded to requests for more information. However, it has recently come to attention that our JQL logic is flawed, as we use the "updatedDate" operator, which is actually too broad of a scope, as we do not want the timer on issues to reset any time a Service Desk Agent updates the issue. I.e we are basically looking for an operator like "reporterLastCommentedDate". We have many more automation rules that run on tickets to remind the Reporter to provide us with more info, but they all follow the same core logic as our Close Ticket rule (below):
status = "More Information Needed" AND updatedDate < -14d AND reporter != {{issue.comments.last.author.name}} AND resolution = Unresolved
(Also I just added the JQL "AND reporter != {{issue.comments.last.author.name}}" which I found in another thread on here, as we do not want to close issues which were last commented on by the user in case they slipped through the cracks on our end. However the "validate query" option becomes greyed out when adding the fourth bracket so I can't tell if that syntax will work - can someone let me know if there are any issues with that?
Hi @Evan Gilner
Full disclosure that I am not using Jira Service Desk, so I am answering based upon what I see in your automation and JQL...
I wonder if you instead run your scheduled trigger on the non-user information, and then add a condition for checking displayName if that will help. For example:
Yet, that could have a problem if someone other than the reporter commented after the reporter responded. A more certain fix would be to add a custom date/time field for reporterLastResponded. Then add a rule triggered on comments which update the field if it was the reporter. You could then explicitly check that field in your scheduled trigger rule.
Best regards,
Bill
Thanks Bill.
So I did end up writing an automation to create a variable 'lastUserComment'...
However, I can't figure out for the life of me how to utilize this new custom variable. It sounds like I need to create a new custom field within the relevant workflow configurations (which would be all my workflows I believe), however when I do so I can't find a way to insert my custom variable into the new custom field.
Yes, I'm well aware of the fact that I'm a programming novice, my apologies! I greatly appreciate the assistance.
Evan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Evan!
After you create a variable, you may use it in the rule just like any other smart value. From your screen image, that would be {{lastUserComment}}
I note where you are setting the value, you changed the syntax a bit. Didn't you want the actual comment? Something like:
{{issue.comments.last.body}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Apologies for getting back to you so late. I've been super busy with the day-to-day Service Desk duties at my company!
I appreciate you helping to clarify that the Variable is the value I can use outside of this particular automation rule.
As for the Smart value, I was not aware that the name I set for it was anything more than a name, just like the Variable name.
So if I'm understanding you correctly, I would then replace 'updatedDate' from the JQL in my rule in my first screenshot with '{{lastUserComment}}'. The thing is though, when I use the brackets, the button to validate my query becomes greyed out, and when I delete the brackets, I get an "Invalid JQL" error saying that the field 'lastUserComment' does not exist or I do not have permission to view it.
Is this because I also need to create a custom field to store this new variable, and insert it into the Request forms for all Issue Types in all Projects I'd want to utilize this functionality?
Thanks again for all your help.
Evan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evan,
First thing: created variables only exist within the rule where they are created. They do not exist outside. What I meant was you can use it only in that rule.
Next, the JQL you mention which uses a smart value cannot be validated *at design time* in the rule editor. That is why that validate button is disabled.
I think you are on the correct track that if you need to check the last comment and the last commentor (person/user), you could store that in a custom field for use later in the other rule. For example, by saving the last date/time the reporter commented.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.