task #26
closedPlugin doesn't work when you have a recurrence to a bloqued user
Description
After blocking a user, plugin fails for other recurrences.
This is the error when trying to create them:
rake aborted! ActiveRecord::RecordInvalid: Validation failed: Assignee is invalid /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/validations.rb:80:in `raise_validation_error' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/validations.rb:52:in `save!' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/transactions.rb:315:in `block in save!' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/database_statements.rb:265:in `transaction' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/transactions.rb:212:in `transaction' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/transactions.rb:385:in `with_transaction_returning_status' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/transactions.rb:315:in `save!' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/suppressor.rb:48:in `save!' /usr/src/redmine/plugins/issue_recurring/app/models/issue_recurrence.rb:389:in `block in create' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/transactions.rb:212:in `transaction' /usr/src/redmine/plugins/issue_recurring/app/models/issue_recurrence.rb:373:in `create' /usr/src/redmine/plugins/issue_recurring/app/models/issue_recurrence.rb:607:in `block (3 levels) in renew_all' /usr/src/redmine/plugins/issue_recurring/app/models/issue_recurrence.rb:607:in `each' /usr/src/redmine/plugins/issue_recurring/app/models/issue_recurrence.rb:607:in `block (2 levels) in renew_all' /usr/src/redmine/plugins/issue_recurring/app/models/issue_recurrence.rb:606:in `each' /usr/src/redmine/plugins/issue_recurring/app/models/issue_recurrence.rb:606:in `block in renew_all' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/relation/delegation.rb:71:in `each' /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/relation/delegation.rb:71:in `each' /usr/src/redmine/plugins/issue_recurring/app/models/issue_recurrence.rb:605:in `renew_all' /usr/src/redmine/plugins/issue_recurring/lib/tasks/issue_recurring.rake:13:in `block (3 levels) in <top (required)>' /usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>' Tasks: TOP => redmine:issue_recurring:renew_all (See full trace by running task with --trace) W, [2020-05-11T19:38:53.248277 #17150] WARN -- : Creating scope :sorted. Overwriting existing method Group.sorted. W, [2020-05-11T19:38:53.283887 #17150] WARN -- : Creating scope :sorted. Overwriting existing method User.sorted. W, [2020-05-11T19:38:53.286140 #17150] WARN -- : Creating scope :having_mail. Overwriting existing method User.having_mail. W, [2020-05-11T19:38:53.694983 #17150] WARN -- : Creating scope :system. Overwriting existing method Enumeration.system. W, [2020-05-11T19:38:56.890503 #17150] WARN -- : DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from instance_eval at /usr/src/redmine/config/routes.rb:370) W, [2020-05-11T19:38:56.892850 #17150] WARN -- : DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from instance_eval at /usr/src/redmine/config/routes.rb:370) W, [2020-05-11T19:38:56.893680 #17150] WARN -- : DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from instance_eval at /usr/src/redmine/config/routes.rb:370) W, [2020-05-11T19:38:56.894558 #17150] WARN -- : DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from instance_eval at /usr/src/redmine/config/routes.rb:370) W, [2020-05-11T19:38:56.895411 #17150] WARN -- : DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from instance_eval at /usr/src/redmine/config/routes.rb:370) W, [2020-05-11T19:38:56.896217 #17150] WARN -- : DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from instance_eval at /usr/src/redmine/config/routes.rb:370) W, [2020-05-11T19:38:56.897019 #17150] WARN -- : DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 6.0. (called from instance_eval at /usr/src/redmine/config/routes.rb:370)
after deleting the blocked user recurrences, the plugin begin working again.
thanks in advance !
Updated by cryptogopher over 4 years ago
- Status changed from new to feedback
- Priority changed from bug to 5
Hi, thank you for reporting!
What is a role of the blocked user regarding this issue? Do I understand correctly, that the recurring issue has been assigned to the blocked user?
It would be best if you could provide:
a) steps required to reproduce the problem,
b) what outcome would you expect instead of error you get (in case the blocked user has been set as an assignee, I think the best plugin could do is to apply default Redmine assignment procedure for new issue; but please let me know what you think).
Updated by cryptogopher over 4 years ago
- Status changed from feedback to closed
Fixed in 93593d4b
When previous assignee is no longer assignable (e.g. due to account being blocked or any other reason recognized by Redmine) and keep_assignee setting is used, default Redmine assignment applies and warning is recorded in issue's note.
Fix will be available in earliest release.