Hi everyone !
I configured a scripted field that updates automatically when the due date has passed.
The goal of the scripted field is to trigger a listner, to send a custom email to the assignee, when the due date has passed without using the workflow.
I tried to use the listener Sen A custom Email but the update of the value of the scripted field is not considered as an issue event (Issue Updated).
I am limited with the add-ons, I only use ScriptRunner.
Maybe a script to automatically update the value of a custom field (not my scripted field) could be a solution ? And how to configure this automatically without action on the workflow ?
Thank you for all the answers you can provide !
Nathan
Actually, no, this won't work.
Scripted fields are not calculated on the fly, they are generated and stored when an issue is indexed. A scripted field may well calculate something based on the due-date, but it won't actually change until the issue is changed in some way.
So there's nothing here to trigger a listener.
What you really need is a service - something that can run regularly and automatically, look for issues who should trigger something because the time has lapsed, and then run whatever it is that needs doing when the date passes.
The most simple case for this is best explained with an example.
Let's say
You would write a service that
When this runs, up to the 37th Octember, it'll do nothing with ABC-123, but on the 38th, it'll set the due-soon to "Yes", and then not update the issue again
Thank you for your assistance regading this matter.
Can I program a script that is daily scheduled to search the due date with scriptrunner ?
I'm not an expert on the differents possibilities of scriptrunner
Nathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you script a service.
You can find examples of running searches in scripts, and lots of other stuff over in https://library.adaptavist.com
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.