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.
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.
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.
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)
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG