Vote #74831
完了Set default category assignee immediately upon category selection
0%
説明
Currently, the one can see default assignee only after the issue is created. This confuses people and it should be good to set it ASAP using AJAX call.
journals
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
I wrote a patch to implement this feature.
Please try to apply this patch: attachment:0001-Set-default_assigned_to_id-in-category.patch
In addition, applying this patch will allow you to set default project assignee in the same way:
attachment:0002-Set-default_assigned_to_id-in-project.patch
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Committed the patch 0001-Set-default_assigned_to_id-in-category.patch. Thank you for improving Redmine.
I will commit the second patch 0002-Set-default_assigned_to_id-in-project.patch for #26680.
--------------------------------------------------------------------------------
This is a nice feature, indeed, but I think that the current implementation has some issues that we should address/clarify:
1. The default category assignee is not cleared when the category is changed with a category without assignee
- Go to new issue page
- Select a category with assignee
- Observe that the assignee is set correctly
- Change the category with a category without assignee
- Observe that assignee remains the previous one
The expected result from my point of view is to clear the assignee.
2. Manually selected assignee is override by the category assignee.
- Go to new issue page
- Manually select an assignee
- Select a category with assignee
- Observe that the manually selected assignee is replaced by the category assignee
The expected result here (and also the current behaviour until this ticket) is to keep the manually selected assignee.
3. Because there are a lot of scenarios and the code become quite complex, we should cover the cases with system tests.
I can help on fixing this issues and adding some tests, just please let me know.
--------------------------------------------------------------------------------
I made a small change that improves the behaviour when changing/removing the category and solves the 2 issues reported by Marius.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
I found another issue:
1. Go to a project with a default category assignee
2. Go to new issue page
3. Select the category with the default assignee
4. Open the Assignee dropdown
5. Observe that the default category assignee is duplicated in the dropdown.
!{width: 50%; border: 1px solid grey;}duplicated_assignee.png!
The issue is generated by the line source:trunk/app/views/issues/new.js.erb#L6
--------------------------------------------------------------------------------
We can deliver this feature as it is and I will try to find a proper implementation for the next minor version of Redmine 4.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
relates,New,26680,Show default assignee when creating new issue
relates,Closed,28951,Cannot clear category field on copying an Issue
relates,New,29695,Duplicated assignee option when selecting a category with default assignee