Project

General

Profile

New plugin EmailWhining v0.0.1 released

Added by chantra . over 14 years ago

Here comes my first plugin

Well, it is not really a plugin as it is meant to be run from a cronjob.
The idea is to have an email sent to owners of an issue if the issue has not been updated in the last X days (as I am not using due date in my use case)

Source is available here:

http://github.com/chantra/redmine_whining/tree/master


Replies (12)

RE: New plugin EmailWhining v0.0.1 released - Added by Roman Musin over 14 years ago

Install with:

ruby script/plugin install git://github.com/chantra/redmine_whining.git

And:

devis@devis:~/Redmine2845$ rake redmine:send_whining days=1 RAILS_ENV="production" --trace
(in /home/devis/Redmine2845)
** Invoke redmine:send_whining (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:send_whining
rake aborted!
Translation string with multiple values: mail_subject_whining
/home/devis/Redmine2845/lib/redmine/i18n.rb:20:in `l'
/home/devis/Redmine2845/vendor/plugins/redmine_whining/lib/tasks/whining.rake:38:in `whining'
/var/lib/gems/1.8/gems/actionmailer-2.2.2/lib/action_mailer/base.rb:462:in `__send__'
/var/lib/gems/1.8/gems/actionmailer-2.2.2/lib/action_mailer/base.rb:462:in `create!'
/var/lib/gems/1.8/gems/actionmailer-2.2.2/lib/action_mailer/base.rb:455:in `initialize'
/var/lib/gems/1.8/gems/actionmailer-2.2.2/lib/action_mailer/base.rb:392:in `new'
/var/lib/gems/1.8/gems/actionmailer-2.2.2/lib/action_mailer/base.rb:392:in `method_missing'
/home/devis/Redmine2845/vendor/plugins/redmine_whining/lib/tasks/whining.rake:57:in `whinings'
/home/devis/Redmine2845/vendor/plugins/redmine_whining/lib/tasks/whining.rake:56:in `each'
/home/devis/Redmine2845/vendor/plugins/redmine_whining/lib/tasks/whining.rake:56:in `whinings'
/home/devis/Redmine2845/vendor/plugins/redmine_whining/lib/tasks/whining.rake:69
/usr/lib/ruby/1.8/rake.rb:617:in `call'
/usr/lib/ruby/1.8/rake.rb:617:in `execute'
/usr/lib/ruby/1.8/rake.rb:612:in `each'
/usr/lib/ruby/1.8/rake.rb:612:in `execute'
/usr/lib/ruby/1.8/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:564:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2027:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2005:in `each'
/usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1999:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1977:in `run'
/usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1974:in `run'
/usr/bin/rake:28

The plugin work with Redmine 2845 revision?

RE: New plugin EmailWhining v0.0.1 released - Added by chantra . over 14 years ago

Hi Roman,

This plugin was only testing on 0.8.4 so far. There is some changes in svn breaking the plugin.
I will try to find some time and port it.

Will update this post when done.

RE: New plugin EmailWhining v0.0.1 released - Added by chantra . over 14 years ago

Roman,

I have uploaded a version that should work with redmine trunk.

Let me know how it goes.

RE: New plugin EmailWhining v0.0.1 released - Added by Martin G over 14 years ago

Hi,

i have planned to change your plugin a little bit myself. My changed plugin does sent an email to assigned user of an issue if the due date of the issue is near to X days. I have not found an existing plugin that makes some kind of this.
So, my question is: It's a problem for you when i make public my changed plugin when it's finished?

best regards

RE: New plugin EmailWhining v0.0.1 released - Added by chantra . over 14 years ago

Sure no problem.

Maybe you can make it an argument switch so your change can be merged wuthin EmailWhining.

RE: New plugin EmailWhining v0.0.1 released - Added by Martin G over 14 years ago

chantra . wrote:

Sure no problem.

Maybe you can make it an argument switch so your change can be merged wuthin EmailWhining.

Hi,

i have make it so. Please check my changes because it was my first try to programming ruby ;)
Here is it.

RE: New plugin EmailWhining v0.0.1 released - Added by chantra . over 14 years ago

Martin G wrote:

Hi,

i have planned to change your plugin a little bit myself. My changed plugin does sent an email to assigned user of an issue if the due date of the issue is near to X days. I have not found an existing plugin that makes some kind of this.
So, my question is: It's a problem for you when i make public my changed plugin when it's finished?

best regards

Arg, I am just re-reading the purpose of your feature and .... it already exist in the stock redmine. Actually, this plugin was inspired from that one.

here is my cronjob:

0 4 * * 1,2,3,4,5     www-data cd /path/to/redmine && /usr/bin/rake redmine:send_reminders days=7 RAILS_ENV="production" 
0 4 * * 1,2,3,4,5     www-data cd /path/to/redmine && /usr/bin/rake redmine:send_whining days=7 RAILS_ENV="production" 

Really sorry for not ready properly your first comment and making you loose your time :s.

RE: New plugin EmailWhining v0.0.1 released - Added by Martin G over 14 years ago

Oh...

Ok, no problem. Maybe you can use in your plugin my written rhtml template. I added a direct link to each issue.

Are there some other interesting tools like this using cronjobs?

RE: New plugin EmailWhining v0.0.1 released - Added by Alexey Chepurnykh over 14 years ago

This is another very useful stuff. Thank you.

But when users receive mail, the message has a strange subject: mail_subject_whining
And text starts from "mail_body_whining". Is this something what everybody has or just me?
Can you fix this?

RE: New plugin EmailWhining v0.0.1 released - Added by Alexey Chepurnykh over 14 years ago

I close my question.
Solution is in vendor/plugins/redmine_whining/lang directory. I put my_lang.yml file here. Should work.

RE: New plugin EmailWhining v0.0.1 released - Added by Alexey Chepurnykh about 14 years ago

Hello, chantra,

Very useful plugin. Are you opened for improvements?
If so, then I have some remarks for improvement.

  1. In the message there are issues from closed projects.
  2. Possibility to sort by priority would be very useful.
  3. Also if one writes timelog, he gets message anyway.

RE: New plugin EmailWhining v0.0.1 released - Added by Felix Schäfer about 14 years ago

Two short questions chantra be:

  1. Any reason why you made your own "query" instead of using some already available redmine helpers? (I had only a quick look, so it might not be possible, but it seemed the plugin doesn't do anything really exotic)
  2. I'd like to refine the query a little bit (tickets may have a due date in the future or less than the configured timeslice in the past, there might be collisions with the stock reminder rake task because you might get mails for a ticket not having been updated since so many days and already being so few days before deadline …), and maybe even make it a more generic "status mail" plugin, are there any guidelines for patch submission/pull request?

(what I mean by "status mail plugin": A rake task/cronjob that would send you a daily report of tickets needing special attention, like those not having been updated since …, those ending soon, maybe even with a special section in the mail for more important tickets, or even the possibility to configure different time periods for whine and reminder based on importance, etc)

Oh, and you should create a .yml language file for each language redmine provides, even if it only contains the english strings too, that would alleviate the missing_translation problems, and maybe some people might send you their updated translations for inclusion in the plugin.

    (1-12/12)