Skip to content

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

@s-andy

Description

@s-andy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions