Commits

Ezio Melotti committed 505ba6c

#497: resort "assigned to" list to show logged username first and to be case insensitive.

Comments (0)

Files changed (1)

html/issue.item.html

  <td tal:condition="context/assignee/is_edit_ok">
   <select name="assignee">
    <option value="-1">nobody</option>
-   <tal:block tal:repeat="userdata python:db._db.user.filter_sql('select id,_username from _user where _roles like \'%Developer%\' order by _username')">
-    <option tal:attributes="value python:userdata[0];
-                            selected python:str(userdata[0]) == context.assignee._value"
-            tal:content="python:userdata[1]"></option>
+   <option tal:attributes="value request/user/id"
+           tal:content="request/user/username">current_user</option>
+   <tal:block tal:repeat="userdata python:sorted(db._db.user.filter_sql('select id,_username from _user where _roles like \'%Developer%\''), key=lambda user:user[1].lower())">
+   <option tal:condition="python:str(userdata[0]) != request.user.id"
+           tal:attributes="value python:userdata[0];
+                           selected python:str(userdata[0]) == context.assignee._value"
+           tal:content="python:userdata[1]"></option>
    </tal:block>
   </select>
  </td>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.