Issue Reminder

Added by Lukas Resch over 7 years ago

Is there a easy way to send a notification to all developers of a projects, when an issue has to be done within 3 days, 1 day and on day 0 and is not marked to be done yet? So they should get 3 mails if they are developer at the project no matter if they are assigned to the issue or not.

Replies (16)

RE: Issue Reminder - Added by Lukas Resch over 7 years ago

How can I use this to send mails to developers, that are not assigned to an issue?

RE: Issue Reminder - Added by Felix Schäfer over 7 years ago

I don't think you can. There is a plugin I believe to send mails on issue creation, see the PluginList for that. I don't know of one that would send mails to all developers at given intervals though, that's more the job of a project lead anyway.

RE: Issue Reminder - Added by Lukas Resch over 7 years ago

Got it done with this script, maybe it can help someone. It makes comments on issues, so everyone on the project gets an update.

#!/usr/bin/env ruby
require 'rexml/document'
require 'open-uri'
require 'net/http'

include REXML

class Fixnum

  def days_from_now
        Time.now + (self * 60 * 60 * 24)
  end
end

[Time.now, 1.days_from_now, 3.days_from_now].each { |due_date|
  date =  due_date.strftime("%Y-%m-%d")
  url = "http://localhost:3000/issues.xml?due_date=#{date}" 

#wir machen den remote file auf:
remote_xml = open(url, :http_basic_authentication=>["admin", "password"])
doc = Document.new(remote_xml)

doc.elements.each("issues/issue/id"){ |id|

   url = "http://localhost:3000/issues/#{id.text}.xml" 

   if date == Time.now.strftime("%Y-%m-%d")
     put_data = "<notes>Has to be done today</notes>" 
   elsif date == 1.days_from_now.strftime("%Y-%m-%d")
     put_data = "<notes>Has to be done tomorow</notes>" 
   elsif date == 3.days_from_now.strftime("%Y-%m-%d")
     put_data = "<notes>Has to be done in 3 days</notes>" 
   end

   command = "echo  \"#{put_data}\" | lwp-request -C admin:password -c \"text/xml\" -m PUT #{url}" 

   system(command)

}}

RE: Issue Reminder - Added by Jacky Leung over 7 years ago

Lukas Resch wrote:

Is there a easy way to send a notification to all developers of a projects, when an issue has to be done within 3 days, 1 day and on day 0 and is not marked to be done yet? So they should get 3 mails if they are developer at the project no matter if they are assigned to the issue or not.

Actually I happened to have wrote a plugin that can do this by creating query, http://github.com/jk2l/redmine_issue_reminder and also I wrote rake task that "suppose" to be able to send out reminder by having a cron calling this.

To create your required task, simply create a reminder have a query say status in progress, due date is less than 3 days. and it will send an email with a list of tickets (with link) and email the to assigned person.

Currently I can't quite test the functionality of cron, as it seem my server doesn't setup properly. (it even failed for RedmineReminderEmails posted by Felix.) but i think you can help me try this out :D

RE: Issue Reminder - Added by Jacky Leung over 7 years ago

I attached examples

2010-08-11_0142.png - Setup query (47 KB)

2010-08-11_0143.png - List of tickets that meet the query (36.4 KB)

2010-08-11_0144.png - Received notification (3.99 KB)

RE: Issue Reminder - Added by Jacky Leung over 7 years ago

btw currently this only send email to assigned developer, if you want to send everyone within the project you may need to do some change in the code (feel free to fork it if you want)

RE: Issue Reminder - Added by Milan Stastny over 7 years ago

Hi in our company we just tried the send_reminder script using cron, it works great but what if...
  • the assigned person is on holiday for a month or so and his task is there undone for all that time
  • the assigned person doesn't have email set-up(we have few of those)
    etc.

So I created a patch for the script adding the send_reminder_all functionality which does the following:

  • works the same as send_reminder
  • sends email to assignee, author and watchers of the due task
  • sends just one email containing all for the one user(assigned, created, watched issues in one mail - not 3 mails for each)

the way we use it is(crontab):

1 0 * * *       root    cd /opt/redmine && rake redmine:send_reminders_all days=1 RAILS_ENV=production

I included the modified files and a diff file for trunk
Locales are only EN and CS

Feel free to modify it, edit it, distribute it, fix it, and INCLUDE IT IN REDMINE TRUNK

RE: Issue Reminder - Added by Jacky Leung over 7 years ago

Milan Stastny wrote:

Hi in our company we just tried the send_reminder script using cron, it works great but what if...
  • the assigned person is on holiday for a month or so and his task is there undone for all that time
  • the assigned person doesn't have email set-up(we have few of those)
    etc.

So I created a patch for the script adding the send_reminder_all functionality which does the following:

  • works the same as send_reminder
  • sends email to assignee, author and watchers of the due task
  • sends just one email containing all for the one user(assigned, created, watched issues in one mail - not 3 mails for each)

the way we use it is(crontab):
[...]

I included the modified files and a diff file for trunk
Locales are only EN and CS

Feel free to modify it, edit it, distribute it, fix it, and INCLUDE IT IN REDMINE TRUNK

Thank you for your feed back and I am glad it actually work. The cron isn't working for me at the moment due to some installation of the system. Current i am in the progress of bugging our server admin to reinstall it on a new server (may take another week or two before it happen). so until then i cannot work/test/use the cron functionality :(

RE: Issue Reminder - Added by Milan Stastny about 7 years ago

Ok after some work i transfered it to not to be as patch but as a plugin.

http://www.redmine.org/wiki/redmine/Plugin_List#Advanced-reminder

The usage is the same.

RE: Issue Reminder - Added by Terence Mill about 7 years ago

I thinh that can result in mass emails, if you watch a bunch of emails which will be diued all to next release, you will get many email at the same time if the release is finshed. It would make sense to define per user if he wants get notified immidiately or once per day for alle changes. Is a general problem that redmine doesn't summarize email's triggered by time-near events or sumnmary emails for special types of notification/trackers.

RE: Issue Reminder - Added by Milan Stastny about 7 years ago

Terence Mill wrote:

I thinh that can result in mass emails, if you watch a bunch of emails which will be diued all to next release, you will get many email at the same time if the release is finshed. It would make sense to define per user if he wants get notified immidiately or once per day for alle changes. Is a general problem that redmine doesn't summarize email's triggered by time-near events or sumnmary emails for special types of notification/trackers.

If this concerns the plugin, there is no mass emails, it is executed through cron job once a day, not on every change. But anyway, the plugin doesn't respect user settings in respect to email notification, user gets emails if he wants to or not, I was thinking about modifying this to respect it.

RE: Issue Reminder - Added by Angelle Shaffette almost 7 years ago

I am having an issue with this plugin. All of the users in Redmine receive reminders when issues are due within the next 5 days except for one, but this user receives the notification emails directly from Redmine when something is assigned to that user. The user actually receives the advanced reminder email, but the email states "0 issues assigned to you are due in the next 5 days" even though the user has issues assigned in Redmine. Can someone help? I have posted this same issue under the help forum and to other forums with similar issues and haven't received any replies.

RE: Issue Reminder - Added by Milan Stastny almost 7 years ago

Hi somebody else reported the same issue on github https://github.com/alvila/redmine_reminder/issues#issue/1
Will be solving it there. If you can just say what version of redmine are you using? There seems to be some change in the trunk version (or at least 1.1.0+ versions).

RE: Issue Reminder - Added by Angelle Shaffette almost 7 years ago

I am running Redmine 1.0.4.stable. I currently have three projects. One has no issues. One has three issues with on of those closed. The third has one open issue. The watcher portion of the reminder works for the one user I am having issues with. It is just the assigned portion that doesn't work. I actually went into mysql and deleted and recreated the user just to make sure the account wasn't corrupt and I still got the same results. I also tested the reminder on all of my other users and it works perfect.

RE: Issue Reminder - Added by Earl ng about 2 years ago

Lukas Resch wrote:

Got it done with this script, maybe it can help someone. It makes comments on issues, so everyone on the project gets an update.

[...]

I was wondering if this script here was still valid for Redmine 3.1? Any help would be much appreciated!

(1-16/16)