Opened 17 years ago
Closed 17 years ago
#5394 closed defect (fixed)
Order user list alphabetically
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | ticket sort |
Cc: | r.sokoll@…, Eli Carter | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
In trac.ini, I have restrict_owner = true set so that my users are listed in the "assign to" and "reassign to" fields. But they are shown in a seemingly random order.
I'm attaching a patch to ticket/api.py which sorts the user by username (case-insensitive).
Attachments (1)
Change History (7)
by , 17 years ago
Attachment: | api.py.diff added |
---|
comment:1 by , 17 years ago
Milestone: | → 0.11 |
---|---|
Owner: | changed from | to
I'll integrate that in FieldRefactoring first.
comment:2 by , 17 years ago
The patch I submitted only applies to the dropdown list for initial ticket assignment. The code for generating the list for reassigning a ticket is separate.
Thus there are a few different options here:
- Duplicate the code from the patch I submitted in the render_ticket_action_control method in ConfigurableTicketWorkflow (ticket/default_workflow.py)
- Modify perm.get_users_with_permission to accept an optional keyword parameter. Something like:
owners = perm.get_users_with_permission('TICKET_MODIFY', sorted=True)
- Consolidate the code for getting lists for assign and reassign to one method.
Options 2 and 3 are not mutually exclusive.
comment:3 by , 17 years ago
Cc: | added |
---|---|
Milestone: | 0.11.1 → 0.11 |
Type: | enhancement → defect |
Since this is working as expected in the 0.10 branch, it is more a bug than an enhacement.
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r5858. The fix had to be done in default_workflow.py
rather than api.py
.
comment:5 by , 17 years ago
Cc: | added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
This fixed the list in the actions, but the list on the 'new ticket' page is still random.
patch for ticket/api.py to sort user names