Automation condition: Compare if lastCommentAuthor == Reporter

I have a non-Service Desk project and I'm trying to create some automation to notify/close tickets when the Reporter has not commented on an issue in >3 days.

(If issue was updated >3 days ago and the last comment author is not the reporter, the automation rule should run. If updated >3days ago and the last comment author IS the reporter, the automation should NOT run)

The automation action would be to Send email, transition issue, or add a label, depending on the duration since last updated.

I have Adaptivist ScriptRunner and JIRA Automation plugins.

I've tried creating Automation that uses JQL to determine when the issue was last commented/updated.

I also have a Scripted field that shows the Last Comment Author (using UserPicker filter type), but I can't find any way in JQL/Conditions to compare this scripted field against "Reporter" to see if they equate...


1 answer

1 accepted

1 vote
Accepted answer

Hi Charles,

You can do this with Automation for Jira fairly easily I think

So you need a rule like this:

  • Trigger: Scheduled (run once a day) with JQL:
    updated < -3d
  • JQL Condition: 
    reporter != {{}}
  • Action: Send e-mail etc


For the action part you can split this up further by duration if you use rule branches:

  • Branch action: Current issue
    • JQL condition: updated >= -4d and updated < -3d
    • Action: label
  • Branch action: Current issue
    • JQL condition: updated < -4d
    • Action: send e-mail

So this would label the issue if it's not been updated between 3-4 days ago, and send an e-mail if it's not been updated for longer than 4 days ago.

Hope this makes sense.




I tried your JQL in issue search and I get an error saying that "{" and "}" are reserved characters.

When I use escaping:

updated < -3d AND reporter != \u007b\\u007d\u007d

I get this error: The value '{{}}' does not exist for the field 'reporter'.

Andreas Knecht Community Champion Oct 12, 2017

Hi Charles,

So you can only use smart values ('{{' and '}}') in Automation for Jira.  We substitute them with real values when the automation rule executes, but Jira's issue search doesn't understand them directly.

Here's an example rule that should work:


If you want to test this out in Jira' issue search, you need to substitute an example value for the smart-value:

updated < -3d AND reporter != fred

Hope that makes sense!



Andreas are you sure?

I created the rule exactly as you have shown and I still can't publish it (see the JQL error in my screenshot)


Andreas Knecht Community Champion Oct 16, 2017

Hi Charles,

Looks like you might be running an older version of Automation for Jira, where this wasn't supported yet. What version are you running?

Can you try upgrading to the latest via 'Manage add-ons' in global admin and then try this again please?



I am running 3.4.20 of Automation for JIRA, and I still get this error whenever I attempt to publish a rule with the configuration pictured in the screenshots here.

Andreas Knecht Community Champion Oct 16, 2017

Hi Charles,

Actually apologies - I gave you slightly the wrong answer before. The smart-value doesn't work directly in the scheduled trigger, since there's no 'issue' in the context yet.

You need to change your rule to this:

  • Trigger: Scheduled with JQL updated < -3d
  • JQL condition: reporter != {{}}
  • Action: Add comment


Here's a screenshot:



Sorry about getting this wrong the first time!

So this will work, since for the JQL condition there's now an issue in context, that can be access via the smart-value.



It works wonderfully when I tried it as a condition, thanks Andreas!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,084 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you