Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a groovy script triggering an event

Fabian Graevenitz September 4, 2020

Hey there.

I want to provide automatic notifications for issues scheduled to a certain day (in German we call it Wiedervorlage - couldn't find a proper translation).

Therefore I defined a custom event and a custom field of type date. Now I want Jira to trigger my event on every issue whose date value is today.

We have ScriptRunner add-on at our disposal and I found the feature "Custom scheduled job". So far so good. Now my question: Where can I find how to write a script which triggers my event? A code example would be helpful.

Cheers, Fabian

1 answer

1 accepted

0 votes
Answer accepted
Joshua Sneed Contegix
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2020

Hi Fabian,

I do not speak German, but it looks like Wiedervorlage translates directly to 'again template.' I think this would be closer to 'follow-up' or 'resubmit/resubmission.'

I don't think that you need a script to accomplish this goal. You could configure a filter that includes JQL to only show issues with your date field set to 'today' using the startOfDay() function. You may also want to use Greater than equals or Less than equals Operators. After the filter is saved, you can subscribe to your search results.

Here are several JQL searches against date fields set to 'today.'

Cheers!

Fabian Graevenitz September 14, 2020

Hi Joshua,

 

I think "resubmit" is the fitting translation. I already had a filter but I didn't know about subscribing to filters. So this solved my problem actually. Thanks a lot!

 

Cheers from Berlin,

Fabian

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.5
TAGS
AUG Leaders

Atlassian Community Events