Patch #2780
closedClosed issues assigned to people are confusing
0%
Description
Some customers use assignment as the way to push an issue forward. They do however forget to clear assignment when they close issues, cluttering up "my page", statistics and filters showing issues to be handled.
Since we never found a reason to assign a closed issue (if we need to assign it, it should have an open status), we patched /app/models/issue.rb to clear assigned if saving with a status that is closed.
This might be useful for others. If implemented in base Redmine there might be reasons to make this configurable IF someone do assign closed issues for a purpose.
There might be a nifty way to do this by plugin, i'm not all that up to speed with the hooks and stuff yet.
/T
Files
Updated by Eric Davis almost 16 years ago
Clearing the assignment might not be desirable, in case the issue was reopened later.
If you wanted to pluginize this, this code should work (using my head as the Ruby interpreter)
# Create a directory in vendor/plugins and save this code to a init.rb in there
module UnassignIssuesWhenClosed
def self.included(base)
base.send(:include, InstanceMethods)
base.class_eval do
before_save :unassign_if_closed
end
end
module InstanceMethods
def unassign_if_closed
self.assigned_to = nil if IssueStatus.find(status_id).is_closed
end
end
end
Issue.send(:include, UnassignIssuesWhenClosed)
Updated by Ewan Makepeace over 15 years ago
-1
PLEASE dont do this. We assign every closed issue to the developer who should be credited and then compute daily, monthly and annual throughput - and pay bonuses and in some cases hourly rate (for outsourced work) based on those numbers. Clearing that field would be a huge blow.
Updated by Ewan Makepeace over 15 years ago
PS I dont think having closed issues assigned clutters any of the views or the statistics? Certainly never run across any issues in that regard - most views are filtered to open views anyway?
Updated by Thomas Pihl over 15 years ago
Sounds like a configurable plugin might be the best solution :)
TY Eric for the plugin-pointer.
/T
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
-1 also from me, I don't think the majority of users would need this
Updated by Mischa The Evil over 11 years ago
Jan Niggemann wrote:
-1 also from me, I don't think the majority of users would need this
I agree. A plugin solution would be best for this if such is required.
Updated by Go MAEDA almost 8 years ago
- Status changed from New to Closed
It is a special requirement unique to the author's organization, not appropriate for Redmine core.
Closing.