Script Listener: Using Updated Date Field as condition


I am trying to create a script listener were I need the conditions to meet when the job has been in the Awaiting Client column and has not been updated or progressed to a different transition for more than a set time period e.g. 30 days.

This will enable us to monitor our clients work more effectivly by ensuring it doesnt get left.

So far i have the following for the Condition field:

(issue.status?.name=="Awaiting Client") AND (issue.UpdatedDate >= -100d)

It seems to error on the UpdatedDate part of the condition and I cant find any documentation anywhere that define what variables can be called in the condition.

Any help would be greatly apprecaited.

2 answers

1 accepted

try issue.updated

I have tried already and it does not work.

When i use this in the email template: ${issue.updated()}

The following error is produced

groovy.lang.GroovyRuntimeException: Could not find matching constructor for: groovy.lang.Binding(groovy.lang.Binding)

in the mail template you should use ${issue.getUpdated()} or ${issue.updated} - getters shouldbe used properly. As for conditions, could you please give more info how do you add those conditions and put the script itself here?

Basically What im trying to do is set up an custome email script listener that will send an email when a ticket has been in a certain status for more than 30 days for example.

My idea for the conditions to setup this function was to have it compare the updated date of the ticket against the current system date and send an email if it is more than say 30 days.

My attempt at this resulted in:

(issue.status?.name=="Awaiting Client") AND (issue.UpdatedDate > = -100d)

By the way thank you for the getUpdated option.

But that won't be called until the issue is updated, so that condition will never be true (notwithstanding the syntax is all wrong, as Alexey says it's a timestamp.

I think you want

Ok then that seems to match my requirements. Ill give that a try. :)

I realised that my syntax may be wrong. I dont suppose you have any resources available that would help me for the future when it comes to script listeners with regards to the various fields that are available to be called as it currently takes me a while of searching through the doucmentation and forums before i find that a particular field can be called?

If not it doesnt matter.

Thank you both for your help, it is greatly appreciated.


To check for issue not being updated in the last 30 days you could use:

issue.updated < new Timestamp((new Date() - 30).getTime())

issue.updated < new Timestamp((new Date() - 30).getTime()) is not workig giving error:

unable to resolve class timestamp

Regarding the javadoc, there are no getUpdatedDate() method on the Issue object (

I think the method you are looking for is issue.getUpdated() which returns a Timestamp and not a number (don't use <= 100d)

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,232 views 5 10
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