Patch #27510
closedIntroduce active? method to Group via Principal model
Description
Groups should have "active" method, because they can be assigned issues to, and are treated in many ways as users.
Some plugins like https://github.com/Restream/redmine_reminder use it, and even cause error as described here
https://github.com/Restream/redmine_reminder/issues/5
Even though it could be resolved as a plugin my opinion is that groups.rb model should have active method, simply because they
already have status attribute...
So proposed is to add active? method, as provided in patch file.
Files
Updated by Go MAEDA 3 months ago
- File 27510.patch 27510.patch added
- Target version set to Candidate for next major release
The attached patch moves active?
, registered?
, and locked?
methods from the User model to the Principal model.
With this change, groups will also have these three methods, just like users.
Updated by Go MAEDA 3 months ago
- Subject changed from Groups active method to Add active?, registered?, and locked? methods to the Group model by moving them from the Users model to the Principal model
- Category changed from Groups to Code cleanup/refactoring
- Target version changed from Candidate for next major release to 6.0.0
Setting the target version to 6.0.0.
Updated by Go MAEDA 3 months ago
- Subject changed from Add active?, registered?, and locked? methods to the Group model by moving them from the Users model to the Principal model to Add active?, registered?, and locked? methods to the Group model by moving them from the User model to the Principal model
Updated by Go MAEDA 3 months ago
- File 27510-v2.patch 27510-v2.patch added
- Subject changed from Add active?, registered?, and locked? methods to the Group model by moving them from the User model to the Principal model to Add active? method to the Group model by moving it from the User model to the Principal model
Updated the patch. This version of the patch moves only the active?
method, does not move registered?
and locked?
methods to the Principal model. This is because the Group model does not allow STATUS_LOCKED
and STATUS_REGISTERED
statues.
source:tags/5.1.3/app/models/group.rb#L34
self.valid_statuses = [STATUS_ACTIVE]