From 73c7ae23ad5cf2599117c8b33fcc30876ac5dd53 Mon Sep 17 00:00:00 2001 From: Mika Andrianarijaona Date: Thu, 9 Jun 2016 17:24:49 +0300 Subject: [PATCH] fix: display current user at first in assignment popup fixes #1012 Signed-off-by: Mika Andrianarijaona --- AUTHORS.rst | 1 + CHANGELOG.md | 1 + app/coffee/modules/common/lightboxes.coffee | 1 + 3 files changed, 3 insertions(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 120d1e5b..3f669728 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -26,6 +26,7 @@ answer newbie questions, and generally made Taiga that much better: - Guilhem Got - Jordan Rinke - Miguel de la Cruz +- Mika Andrianarijaona - Pilar Esteban - Ramiro Sánchez - Ryan Swanstrom diff --git a/CHANGELOG.md b/CHANGELOG.md index c8b29a01..9f9d9827 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Errors (not found, server error, permissions and blocked project) don't change the current url. - Attachments image slider - 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 - Lots of small and not so small bugfixes. diff --git a/app/coffee/modules/common/lightboxes.coffee b/app/coffee/modules/common/lightboxes.coffee index 205b51bb..3fa982a3 100644 --- a/app/coffee/modules/common/lightboxes.coffee +++ b/app/coffee/modules/common/lightboxes.coffee @@ -527,6 +527,7 @@ AssignedToLightboxDirective = (lightboxService, lightboxKeyboardNavigationServic render = (selected, text) -> users = _.clone($scope.activeUsers, true) 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? ctx = {