Patch #2780
closed
Closed issues assigned to people are confusing
Added by Thomas Pihl almost 16 years ago.
Updated almost 8 years ago.
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
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)
-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.
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?
Sounds like a configurable plugin might be the best solution :)
TY Eric for the plugin-pointer.
/T
- Category set to Issues workflow
-1 also from me, I don't think the majority of users would need this
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.
- Status changed from New to Closed
It is a special requirement unique to the author's organization, not appropriate for Redmine core.
Closing.
Also available in: Atom
PDF