Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reminders sent with 0 issues pending #1

Open
tjahns opened this issue Feb 9, 2011 · 9 comments
Open

Reminders sent with 0 issues pending #1

tjahns opened this issue Feb 9, 2011 · 9 comments

Comments

@tjahns
Copy link

tjahns commented Feb 9, 2011

I have the following cron job running:

1 0 * * * test -e $HOME/redmine && cd ${HOME}/redmine && rake redmine:send_reminders_all days=4 project=foo RAILS_ENV=production | grep -v '(in '"$HOME"'/redmine-1.1.0)'

Today I got an email with the following subject:

Subject: 0 issues due in the next 4 days

And of course, it contained nothing but a link to the list of issues in project foo and the standard disclaimer.

I'm a bit nervous about this feature, because after the plugin seemed to work fine for some time in project foo, I'd like to roll it out for all projects, but that won't fly if every user receives such useless email.

@alvila
Copy link
Owner

alvila commented Feb 28, 2011

Hi,

I suppose you have some issues due, or are there none? I will have a look at this since there was the same issue reported in redmine(http://www.redmine.org/boards/2/topics/16244?r=21963).

I will need some additional info though. Redmine version is 1.1.0? How many issues are in the foo project?

I haven't actually tested it on the latest redmine so there might be some fix needed for it, will have a look in to that and keep you posted.

Thank you for the report.

@tjahns
Copy link
Author

tjahns commented Feb 28, 2011

Hello,

On 02/28/11 09:22, alvila wrote:

I suppose you have some issues due, or are there none?

at the time I got said email, I had no issues due.

I will have a look at this since there was the same issue reported in redmine(http://www.redmine.org/boards/2/topics/16244?r=21963).

I will need some additional info though. Redmine version is 1.1.0?

Yes, redmine 1.1.0.

How many issues are in the foo project?

45, sub-projects included.

I haven't actually tested it on the latest redmine so there might be some fix needed for it, will have a look in to that and keep you posted.

Thanks, I really appreciate what the community has achieved with redmine and
associated software.

Thomas

@tjahns
Copy link
Author

tjahns commented Feb 28, 2011

Perhaps as a note: I do have some issues assigned to me without a due date set.

@alvila
Copy link
Owner

alvila commented Mar 3, 2011

That doesn't make any difference, issues without due date are not counted in the list. Still looking into it.

@alvila
Copy link
Owner

alvila commented Mar 3, 2011

Don't know why I always close this:) sorry for that.

Modified and tested the reminder on latest redmine Redmine 1.1.1.devel.4995 and on my end it seems to work ok.

Fixed the thing with 0 issues due messages, these are not going to be sent now. By the way if you need just assigned issues, there is this function already build in in redmine;)

Let me know if this works now.

@tjahns
Copy link
Author

tjahns commented Mar 3, 2011

Sorry, I got this:

Subject: Cron <redmine@eyewall> test -e $HOME/redmine && cd ${HOME}/redmine  && rake redmine:send_reminders_all days=4 project=test-project RAILS_ENV=production | grep -v '(in /home/redmine/redmine-1.1.0)'
[...some header lines elided...]
rake aborted!
undefined method `[]' for nil:NilClass

(See full trace by running task with --trace)

When running with --trace, I get:

rake aborted!
undefined method `[]' for nil:NilClass
/home/redmine/redmine-1.1.0/vendor/plugins/redmine_reminder/lib/tasks/reminder_all.rake:112:in `reminders_all'
/home/redmine/redmine-1.1.0/vendor/plugins/redmine_reminder/lib/tasks/reminder_all.rake:171
/usr/lib/ruby/1.8/rake.rb:546:in `call'
/usr/lib/ruby/1.8/rake.rb:546:in `execute'
/usr/lib/ruby/1.8/rake.rb:541:in `each'
/usr/lib/ruby/1.8/rake.rb:541:in `execute'
/usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:494:in `invoke'
/usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1909:in `each'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1903:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1881:in `run'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1878:in `run'
/usr/bin/rake:28
** Invoke redmine:send_reminders_all (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:send_reminders_all

As an afterthought: this problem is not specific to the new version, it also happens with the previous one on this project. But I don't know what's special about test-project here.

@shaffettea
Copy link

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.

@tjahns
Copy link
Author

tjahns commented Mar 18, 2011

Milan, I did some experiments and my solution seems to work. Could you send an email to jahns (at) dkrz dot de, so I can contact you back with a repository URL.

@shaffettea
Copy link

The fix doesn't seem to have worked. The user I was having issues with still gets get an email with "0 issues due in the next 5 days" even though there are multiple issues assigned and due in two days. (The lines marked as > are tjahns responses to me)

That's unrelated to the type of bug my fix is for: I did not want the system to
send out an email at all in case there are zero issues due [1].

I also have a question about how the reminder should work. I have another user with 5 issues due in the next two days. He gets the correct email but the issue with the nearest due date is at the bottom of the list. I would think the issue should be at the top.

The rake task does not sort the issues by due date as far as I know, but that
would be a useful feature.

I am the author of all the issues currently in the system (with 5 - 7 due within the next 5 days). I get an email with only "1 issue that is created by you is due in the next 5 days".

That's not as the plugin is intended to work and should be fixed[2].

I guess you should report the issues I marked [1] and [2] separately at Milan's
Github site, perhaps giving some information on the version of redmine you are
running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants