The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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

DEPLOYMENT TYPE
SERVER
VERSION
8.5.5
TAGS
AUG Leaders

Atlassian Community Events