Forums

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

How to send repetitively notification to an user when the workflow is in a status?

Dana Maria M July 23, 2020

Hello,

I have a situation and I don't know how to solve.

When the workflow is in the 'Validation' status and the 'Completion Date' custom field is filled I need to send a custom notification from 7 to 7 days if 'Completion Date' is before the current date. The user is in a custom field.

I created a Script Runner Listener and I could do that but not automatically, only when I updated the issue.

Do you know someone a solution for this case?

Thanks in advance,

Dana

1 answer

0 votes
Nic Brough -Adaptavist-
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.
July 23, 2020

Run a search for the issues you want to remind them about, save it as a filter and then use "subscribe"

Dana Maria M July 24, 2020

Hello Nic,

Thanks for your answer but it's not what I need.

I need to send a custom notification to an user from a custom field. The user is changed from issue to issue. Here I can use only groups. From this reason I created the listener but I don't know how to use it automatically. Or to create an event for this case (if the issue is in the Validation status for 7 days or something similar).

Regards,

Dana

Dana Maria M July 24, 2020

I found the solution for my case.

Regards,

Dana

Nic Brough -Adaptavist-
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.
July 24, 2020

Ok, the solution I gave does technically do what you need, in reporting issues to users that they need to do something about at the right time.  But I totally understand that it is not quite what you want.

I think there are some problems with what you're describing now. 

Fields do not drive notifications, they're just data.  Notifications are triggered by change, not static data.  A notification can only happen when there is an event, and events are only fired when something changes.

So, to get a notification, you have to have something change.  "the time now is 7 days past a date field" is not a change, nothing on the issue changes, so there's no event to trigger a notification.

A listener can't do it - listeners listen for events and respond to them, they don't scan for stuff, and your need is not something that creates events.

In plain Jira, a subscription is the only service that does notifications without events, and it does it by being a service that says "run a search at specific times which get a list of issues and mails people that list"

You will need to do something similar here - create a new service that runs regularly, finds all the issues that need to generate a notification, and then for each, do one of:

  • Directly create an event that the notification system can pick up
  • Amend/comment on/update the issue so that an issue updated event is fired
  • Build its own notification and send it when the search finds one or more issues to talk about
Like Vikrant Yadav likes this
Dana Maria M July 27, 2020

Hello Nic,

The solution was:

  • Create a custom event
  • Create a hidden transition from the 'Validation' status to the 'Validation' status and add the fired event in post-function
  • Create a listener and use on it the fired event (create the email template and use the custom field to send the email to, everything base on conditions)
  • Create a job and use on it the action (hidden transition) which runs one per week

Regards,

Dana

Suggest an answer

Log in or Sign up to answer