Feature #482
default assignment setting
| Status: | Assigned | Start: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | Eric Davis | % Done: | 0% |
|
| Category: | Issues | |||
| Target version: | - | |||
| Resolution: |
Description
It would nice to have a setting item to select default assignment for a new ticket,
History
Updated by Curtis Stewart over 2 years ago
I just was asked if this feature was possible.
This would enhance the usage from a group of users, so if possible this should be set the the project or the tracker.
Updated by James Robertson over 1 year ago
I would like to vote for this feature, as would the people in these discussion topics I imagine:
http://www.redmine.org/boards/1/topics/3736
http://www.redmine.org/boards/1/topics/5470
Updated by Eric Davis about 1 year ago
- Category set to Issues
Good idea. I'm thinking this would have to be per project.
Updated by Zarooba Rozruba about 1 year ago
This would be great, I have been trying to set up categories in many of projects. Some users try to fill every field out, and categories have own assignment.
However, half of my projects lack categories, and for those that do, only half of users bother with categories.
Updated by Douglas Campos about 1 year ago
I will need some help at the position of the selector in settings screen. (Visual tips)
wip branch at http://github.com/qmx/redmine/tree/ticket-482
Updated by Adam Piotr Żochowski about 1 year ago
Hi Douglas,
I have tried your change, am not sure if I understand how it behaves, could be that I failed backporting it to 0.8.3.
What I did to get your change going¶
SQL: ranalter table projects add default_assignee_id int;
/app/models/project.rb: added linehas_one :default_assignee, :class_name => "Member"
/app/controllers/issue_controller.rb: added lines @issue.assigned_to_id = @project.default_assignee.user.id @project.default_assignee
/app/views/_projects/_form.rhtml: added lines
<p>
<% members = @project.members.find(:all, :include => [:role, :user]).sort %>
<%= f.select :default_assignee_id,
members.collect{|member| [member.name, member.user.id]},
{:include_blank => :none} %>
</p>
This is your change as far as I can read it.
Recommended change¶
The major change I would do is your issue_controller.rb.
You have changed that issue opens with a assigned to being already picked. This is wrong, as now category based assigned to are ignored.
Instead, I would put the default assigned to through the /app/models/issue.rb where I would add secondary fallback, If still no assigned to, use default assigned to. This would then become something along the lines of:
def before_create
# default assignment based on category
if assigned_to.nil? && category && category.assigned_to
self.assigned_to = category.assigned_to
end
++ if assigned_to.nil?
++ self.assigned_to_id = @project.default_assignee_id
++ end
end
(not sure if proper diff syntax, hand made)
question¶
In model project.rb, you have defined that default_assignee is a member type, yet in database, and everywhere else, you write user.id (not member.id) . If that is the case, why not define the model that default_assignee is just user. Afterall, only the dropdown (in /app/views/_projects/_form.rhtml) loads data from Members anyways.
Thank you and kind regards
Updated by Douglas Campos about 1 year ago
Hi Adam!
Thanks for looking at this! As I've told, this is a WIP fork...
Anyways, your suggestion rocks! I will implement it ASAP. Now I'm digging the insides of redmine, there's always room for improvement in my code!
Again, thank you for taking the time to review this.
Updated by Douglas Campos about 1 year ago
I've almost finished it (more tests maybe?)
Can someone review it again? (http://github.com/qmx/redmine/tree/ticket-482)
Thanks
Updated by Eric Davis about 1 year ago
- Status changed from New to Assigned
- Assigned to set to Eric Davis
Thanks, I'll do a quick review of the patch.
Updated by Adam Piotr Żochowski about 1 year ago
I am running this on my Redmine without problems.
With patch #3461 I now have a setup that I enjoy.
Anyone can create Issue
Issue is auto routed (based on category / default assigned to)
That person either approves the issue (and re-routes to developer), or rejects it
Eric, is there anything I can help with to have this included into official Redmine. I can provide you with udiff for 0.8.4.
Kind regards
Updated by Gregor Bader about 1 year ago
Eric Davis wrote:
Thanks, I'll do a quick review of the patch.
+1
Would like to see this in main branch. Another option would be to set the "Assigned to" field mandatory.
Updated by Alex G. 12 months ago
Eric Davis wrote:
Thanks, I'll do a quick review of the patch.
+1.
Maybe it makes sense to have a global setting per project with an ability to overwrite it by the tracker setting (like of defaulted assignment on the tracker level is not set then we user project defaulted assignment)?
Reason is that there could be different departments (support groups) by tracker type - like 1st line support, technical support, R&D...
Updated by Robert Chady 12 months ago
I have a strong dislike for patches in an actively developed application. For this reason, I took a stab at converting this patch to a plugin. It will require an update anytime views/projects/_form.rhtml changes due to it overriding the core one.
I've requested a new hook (#3735) to be added to get around this.
The plugin was written against the latest trunk version and is at git://github.com/rchady/redmine_default_assign.git. Comments are welcome.
Updated by Karlis Vitols 6 months ago
We would be very greatful, if you could provide feedback, if this feature is to be resolved in nearest 2-3 months?
Updated by Anton Statutov 4 months ago
The Plugin doesn't work with the latest Redmine version. I'm still searching the solution. Anybody have one?
Updated by Paul Dann about 1 month ago
Anton Statutov wrote:
The Plugin doesn't work with the latest Redmine version. I'm still searching the solution. Anybody have one?
The plugin works OK for me. Did you run the database migration that is required by the plugin? (rake db:migrate_plugins)
Updated by Raffaello Pelagalli about 1 month ago
- File default_assignee.patch added
Didn't saw this issue before making the patch :)
Here is a patch for this