Hi
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.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 https://jamieechlin.atlassian.net/wiki/display/GRV/Escalation%20Service
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To check for issue not being updated in the last 30 days you could use:
issue.updated < new Timestamp((new Date() - 30).getTime())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
issue.updated < new Timestamp((new Date() - 30).getTime()) is not workig giving error:
unable to resolve class timestamp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Regarding the javadoc, there are no getUpdatedDate() method on the Issue object (https://docs.atlassian.com/jira/6.3.1/com/atlassian/jira/issue/Issue.html)
I think the method you are looking for is issue.getUpdated() which returns a Timestamp and not a number (don't use <= 100d)
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.