fix: display current user at first in assignment popup

fixes #1012

Signed-off-by: Mika Andrianarijaona <mikaoelitiana@gmail.com>
stable
Mika Andrianarijaona 2016-06-09 17:24:49 +03:00 committed by David Barragán Merino
parent 1dfd01835f
commit 73c7ae23ad
3 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,7 @@ answer newbie questions, and generally made Taiga that much better:
- Guilhem Got <guilhem.got@gmail.com> - Guilhem Got <guilhem.got@gmail.com>
- Jordan Rinke - Jordan Rinke
- Miguel de la Cruz <miguel.delacruz@kaleidos.net> - Miguel de la Cruz <miguel.delacruz@kaleidos.net>
- Mika Andrianarijaona <mikaoelitiana@gmail.com>
- Pilar Esteban <pilar.esteban@gmail.com> - Pilar Esteban <pilar.esteban@gmail.com>
- Ramiro Sánchez <ramiro.sanzhez@kaleidos.net> - Ramiro Sánchez <ramiro.sanzhez@kaleidos.net>
- Ryan Swanstrom - Ryan Swanstrom

View File

@ -9,6 +9,7 @@
- Errors (not found, server error, permissions and blocked project) don't change the current url. - Errors (not found, server error, permissions and blocked project) don't change the current url.
- Attachments image slider - Attachments image slider
- New admin area to edit the tag colors used in your project - New admin area to edit the tag colors used in your project
- Display the current user (me) at first in assignment lightbox (thanks to [@mikaoelitiana](https://github.com/mikaoelitiana))
### Misc ### Misc
- Lots of small and not so small bugfixes. - Lots of small and not so small bugfixes.

View File

@ -527,6 +527,7 @@ AssignedToLightboxDirective = (lightboxService, lightboxKeyboardNavigationServic
render = (selected, text) -> render = (selected, text) ->
users = _.clone($scope.activeUsers, true) users = _.clone($scope.activeUsers, true)
users = _.reject(users, {"id": selected.id}) if selected? users = _.reject(users, {"id": selected.id}) if selected?
users = _.sortBy(users, (o) -> if o.id is $scope.user.id then 0 else o.id)
users = _.filter(users, _.partial(filterUsers, text)) if text? users = _.filter(users, _.partial(filterUsers, text)) if text?
ctx = { ctx = {