[Tracker-discuss] [issue497] Resort "Assign To" list
Ezio Melotti
metatracker at psf.upfronthosting.co.za
Wed Jan 2 22:35:07 CET 2013
Ezio Melotti added the comment:
Here's a patch.
----------
assignedto: -> ezio.melotti
nosy: +ezio.melotti
status: unread -> chatting
_______________________________________________________
PSF Meta Tracker <metatracker at psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue497>
_______________________________________________________
-------------- next part --------------
diff --git a/html/issue.item.html b/html/issue.item.html
--- a/html/issue.item.html
+++ b/html/issue.item.html
@@ -144,10 +144,13 @@
<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>
More information about the Tracker-discuss
mailing list