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

The plugin does not check, if the project still exists #76

Open
s-andy opened this issue Jan 16, 2018 · 1 comment
Open

The plugin does not check, if the project still exists #76

s-andy opened this issue Jan 16, 2018 · 1 comment

Comments

@s-andy
Copy link
Contributor

s-andy commented Jan 16, 2018

When a project with periodic task is removed, its tasks are not. This causes crash of the rake task at the line:

Here, #save executes validations and validations attempt to access the project, which does not exist any longer. The exact error message is:

rake aborted!
NoMethodError: undefined method `assignable_users' for nil:NilClass
/opt/bitnami/apps/redmine/htdocs/app/models/issue.rb:928:in `assignable_users'
/opt/bitnami/apps/redmine/htdocs/app/models/issue.rb:729:in `validate_issue'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:34:in `block in checktasks!'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:4:in `checktasks!'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/tasks/periodictask.rake:11:in `block (2 levels) in <top (required)>'
Tasks: TOP => redmine:check_periodictasks
(See full trace by running task with --trace)

I believe, the plugin should be fixed, so that periodic tasks are removed with the project.

@jperelli
Copy link
Owner

Great catch! If you make a pull request, I'll be happy to merge it!

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

2 participants