From 3fff575c22ec920d0cdb504eb7883eb54f873e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Hermida?= Date: Mon, 25 Jun 2018 15:01:19 +0200 Subject: [PATCH 1/8] Debounce load US's --- app/coffee/modules/events.coffee | 2 +- app/coffee/modules/kanban/main.coffee | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/coffee/modules/events.coffee b/app/coffee/modules/events.coffee index b2218d84..f0c45553 100644 --- a/app/coffee/modules/events.coffee +++ b/app/coffee/modules/events.coffee @@ -204,7 +204,7 @@ class EventsService subscription = { scope: scope, routingKey: routingKey, - callback: _.debounce(callback, 500, {"leading": true, "trailing": false}) + callback: callback } message = { diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index da1ca14b..dbca122c 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -31,6 +31,7 @@ bindOnce = @.taiga.bindOnce groupBy = @.taiga.groupBy timeout = @.taiga.timeout bindMethods = @.taiga.bindMethods +debounceLeading = @.taiga.debounceLeading module = angular.module("taigaKanban") @@ -342,8 +343,8 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi initializeSubscription: -> routingKey1 = "changes.project.#{@scope.projectId}.userstories" - @events.subscribe @scope, routingKey1, (message) => - @.loadUserstories() + @events.subscribe @scope, routingKey1, debounceLeading(300, (message) => + @.loadUserstories()) loadInitialData: -> project = @.loadProject() From 8cb3566dc66743df3e0c01843caa55b1c4531a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Hermida?= Date: Tue, 26 Jun 2018 12:02:22 +0200 Subject: [PATCH 2/8] Add debounceLeading to issueslist and taskbord --- app/coffee/modules/issues/list.coffee | 6 +++--- app/coffee/modules/kanban/main.coffee | 2 +- app/coffee/modules/taskboard/main.coffee | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/coffee/modules/issues/list.coffee b/app/coffee/modules/issues/list.coffee index ce29ff0d..ce8b8c99 100644 --- a/app/coffee/modules/issues/list.coffee +++ b/app/coffee/modules/issues/list.coffee @@ -33,6 +33,7 @@ bindOnce = @.taiga.bindOnce debounceLeading = @.taiga.debounceLeading startswith = @.taiga.startswith bindMethods = @.taiga.bindMethods +debounceLeading = @.taiga.debounceLeading module = angular.module("taigaIssues") @@ -309,9 +310,8 @@ class IssuesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi initializeSubscription: -> routingKey = "changes.project.#{@scope.projectId}.issues" - @events.subscribe @scope, routingKey, (message) => - @.loadIssues() - + @events.subscribe @scope, routingKey, debounceLeading(500, (message) => + @.loadIssues()) loadProject: -> project = @projectService.project.toJS() diff --git a/app/coffee/modules/kanban/main.coffee b/app/coffee/modules/kanban/main.coffee index dbca122c..f822c9f1 100644 --- a/app/coffee/modules/kanban/main.coffee +++ b/app/coffee/modules/kanban/main.coffee @@ -343,7 +343,7 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi initializeSubscription: -> routingKey1 = "changes.project.#{@scope.projectId}.userstories" - @events.subscribe @scope, routingKey1, debounceLeading(300, (message) => + @events.subscribe @scope, routingKey1, debounceLeading(500, (message) => @.loadUserstories()) loadInitialData: -> diff --git a/app/coffee/modules/taskboard/main.coffee b/app/coffee/modules/taskboard/main.coffee index 6f918f30..660a90c3 100644 --- a/app/coffee/modules/taskboard/main.coffee +++ b/app/coffee/modules/taskboard/main.coffee @@ -30,6 +30,7 @@ bindOnce = @.taiga.bindOnce scopeDefer = @.taiga.scopeDefer timeout = @.taiga.timeout bindMethods = @.taiga.bindMethods +debounceLeading = @.taiga.debounceLeading module = angular.module("taigaTaskboard") @@ -326,8 +327,8 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga initializeSubscription: -> routingKey = "changes.project.#{@scope.projectId}.tasks" - @events.subscribe @scope, routingKey, (message) => - @.loadTaskboard() + @events.subscribe @scope, routingKey, debounceLeading(500, (message) => + @.loadTaskboard()) routingKey1 = "changes.project.#{@scope.projectId}.userstories" @events.subscribe @scope, routingKey1, (message) => From 27021d71c20d2873c8e6286b32b2b9a5b26f9b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Hermida?= Date: Tue, 26 Jun 2018 13:31:38 +0200 Subject: [PATCH 3/8] Fix filter rtl kanban --- app/styles/layout/rtl.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/styles/layout/rtl.scss b/app/styles/layout/rtl.scss index 573a5780..33d45c14 100644 --- a/app/styles/layout/rtl.scss +++ b/app/styles/layout/rtl.scss @@ -157,7 +157,8 @@ right: auto; } - .taskboard tg-filter { + .taskboard tg-filter, + .kanban tg-filter { left: auto; right: 0; transform: translateX(260px); From fbdbd441f69007c3186e56b265fd52e91aa17762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Hermida?= Date: Thu, 14 Jun 2018 16:58:24 +0200 Subject: [PATCH 4/8] Add assigned users filter --- app/coffee/modules/controllerMixins.coffee | 20 ++++++++++++++++--- .../modules/kanban/kanban-usertories.coffee | 12 +++++------ app/locales/taiga/locale-en.json | 1 + 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/app/coffee/modules/controllerMixins.coffee b/app/coffee/modules/controllerMixins.coffee index a21d0d2b..4c8df028 100644 --- a/app/coffee/modules/controllerMixins.coffee +++ b/app/coffee/modules/controllerMixins.coffee @@ -223,6 +223,7 @@ class UsFiltersMixin loadFilters.project = @scope.projectId loadFilters.tags = urlfilters.tags loadFilters.status = urlfilters.status + loadFilters.assigned_users = urlfilters.assigned_users loadFilters.assigned_to = urlfilters.assigned_to loadFilters.owner = urlfilters.owner loadFilters.epic = urlfilters.epic @@ -249,6 +250,15 @@ class UsFiltersMixin return it tagsWithAtLeastOneElement = _.filter tags, (tag) -> return tag.count > 0 + assignedUsers = _.map data.assigned_users, (it) -> + if it.id + it.id = it.id.toString() + else + it.id = "null" + + it.name = it.full_name || "Unassigned" + + return it assignedTo = _.map data.assigned_to, (it) -> if it.id it.id = it.id.toString() @@ -292,6 +302,10 @@ class UsFiltersMixin selected = @.formatSelectedFilters("tags", tags, loadFilters.tags) @.selectedFilters = @.selectedFilters.concat(selected) + if loadFilters.assigned_users + selected = @.formatSelectedFilters("assigned_users", assignedUsers, loadFilters.assigned_users) + @.selectedFilters = @.selectedFilters.concat(selected) + if loadFilters.assigned_to selected = @.formatSelectedFilters("assigned_to", assignedTo, loadFilters.assigned_to) @.selectedFilters = @.selectedFilters.concat(selected) @@ -324,9 +338,9 @@ class UsFiltersMixin totalTaggedElements: tagsWithAtLeastOneElement.length }, { - title: @translate.instant("COMMON.FILTERS.CATEGORIES.ASSIGNED_TO"), - dataType: "assigned_to", - content: assignedTo + title: @translate.instant("COMMON.FILTERS.CATEGORIES.ASSIGNED_USERS"), + dataType: "assigned_users", + content: assignedUsers }, { title: @translate.instant("COMMON.FILTERS.CATEGORIES.ROLE"), diff --git a/app/coffee/modules/kanban/kanban-usertories.coffee b/app/coffee/modules/kanban/kanban-usertories.coffee index 477bc92b..5f89f29a 100644 --- a/app/coffee/modules/kanban/kanban-usertories.coffee +++ b/app/coffee/modules/kanban/kanban-usertories.coffee @@ -95,7 +95,7 @@ class KanbanUserstoriesService extends taiga.Service move: (usList, statusId, index) -> initialLength = usList.length - + usByStatus = _.filter @.userstoriesRaw, (it) => return it.status == statusId @@ -130,19 +130,19 @@ class KanbanUserstoriesService extends taiga.Service previousWithTheSameOrder = _.filter(beforeDestination, (it) => it.kanban_order == @.order[previous.id] - ) + ) for it, key in afterDestination # increase position of the us after the dragged us's @.order[it.id] = @.order[previous.id] + key + initialLength + 1 - it.kanban_order = @.order[it.id] + it.kanban_order = @.order[it.id] setNextOrders = _.map(afterDestination, (it) => {us_id: it.id, order: @.order[it.id]} - ) + ) # we must send the USs previous to the dropped USs to tell the backend # which USs are before the dropped USs, if they have the same value to # order, the backend doens't know after which one do you want to drop - # the USs + # the USs if previousWithTheSameOrder.length > 1 setPreviousOrders = _.map(previousWithTheSameOrder, (it) => {us_id: it.id, order: @.order[it.id]} @@ -153,7 +153,7 @@ class KanbanUserstoriesService extends taiga.Service us.kanban_order = startIndex + key @.order[us.id] = us.kanban_order - modifiedUs.push({us_id: us.id, order: us.kanban_order}) + modifiedUs.push({us_id: us.id, order: us.kanban_order}) @.refresh() diff --git a/app/locales/taiga/locale-en.json b/app/locales/taiga/locale-en.json index 6af3550e..82c97e4a 100644 --- a/app/locales/taiga/locale-en.json +++ b/app/locales/taiga/locale-en.json @@ -221,6 +221,7 @@ "PRIORITIES": "Priorities", "TAGS": "Tags", "ASSIGNED_TO": "Assigned to", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Role", "CREATED_BY": "Created by", "CUSTOM_FILTERS": "Custom filters", From 3be3fbe4c97051b3fb2c517ee9f7196d5ea741b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Hermida?= Date: Wed, 27 Jun 2018 13:21:17 +0200 Subject: [PATCH 5/8] Update languages --- app/locales/taiga/locale-ca.json | 1 + app/locales/taiga/locale-de.json | 1 + app/locales/taiga/locale-es.json | 1 + app/locales/taiga/locale-fa.json | 1 + app/locales/taiga/locale-fi.json | 1 + app/locales/taiga/locale-fr.json | 1 + app/locales/taiga/locale-it.json | 1 + app/locales/taiga/locale-ja.json | 1 + app/locales/taiga/locale-ko.json | 1 + app/locales/taiga/locale-nb.json | 1 + app/locales/taiga/locale-nl.json | 1 + app/locales/taiga/locale-pl.json | 1 + app/locales/taiga/locale-pt-br.json | 1 + app/locales/taiga/locale-ru.json | 1 + app/locales/taiga/locale-sv.json | 1 + app/locales/taiga/locale-tr.json | 1 + app/locales/taiga/locale-zh-hans.json | 1 + app/locales/taiga/locale-zh-hant.json | 1 + 18 files changed, 18 insertions(+) diff --git a/app/locales/taiga/locale-ca.json b/app/locales/taiga/locale-ca.json index a52e5a26..205be19a 100644 --- a/app/locales/taiga/locale-ca.json +++ b/app/locales/taiga/locale-ca.json @@ -222,6 +222,7 @@ "PRIORITIES": "Prioritats", "TAGS": "Etiquetes", "ASSIGNED_TO": "Assignat a", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Rol", "CREATED_BY": "Creat per", "CUSTOM_FILTERS": "Filtres personalitzats", diff --git a/app/locales/taiga/locale-de.json b/app/locales/taiga/locale-de.json index 2501c98e..4f286b47 100644 --- a/app/locales/taiga/locale-de.json +++ b/app/locales/taiga/locale-de.json @@ -222,6 +222,7 @@ "PRIORITIES": "Prioritäten", "TAGS": "Schlagwörter", "ASSIGNED_TO": "Zugeordnet zu", + "ASSIGNED_USERS": "Zugewiesene Benutzer", "ROLE": "Rolle", "CREATED_BY": "Erstellt durch", "CUSTOM_FILTERS": "Benutzerfilter", diff --git a/app/locales/taiga/locale-es.json b/app/locales/taiga/locale-es.json index 1e806fbe..4d759095 100644 --- a/app/locales/taiga/locale-es.json +++ b/app/locales/taiga/locale-es.json @@ -222,6 +222,7 @@ "PRIORITIES": "Prioridades", "TAGS": "Etiquetas", "ASSIGNED_TO": "Asignado a", + "ASSIGNED_USERS": "Usuarios asignados", "ROLE": "Rol", "CREATED_BY": "Creada por", "CUSTOM_FILTERS": "Filtros personalizados", diff --git a/app/locales/taiga/locale-fa.json b/app/locales/taiga/locale-fa.json index 081b6f72..ac4efd4b 100644 --- a/app/locales/taiga/locale-fa.json +++ b/app/locales/taiga/locale-fa.json @@ -222,6 +222,7 @@ "PRIORITIES": "اولویت‌ها", "TAGS": "برچسب‌ها", "ASSIGNED_TO": "اختصاص یافته به", + "ASSIGNED_USERS": "کاربران اختصاص یافته", "ROLE": "قش", "CREATED_BY": "ایجاد توسط", "CUSTOM_FILTERS": "فیلترهای سفارشی", diff --git a/app/locales/taiga/locale-fi.json b/app/locales/taiga/locale-fi.json index 72d5ac0e..e80187cf 100644 --- a/app/locales/taiga/locale-fi.json +++ b/app/locales/taiga/locale-fi.json @@ -222,6 +222,7 @@ "PRIORITIES": "Kiireellisyydet", "TAGS": "Avainsanat", "ASSIGNED_TO": "Tekijä", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Rooli", "CREATED_BY": "Luoja", "CUSTOM_FILTERS": "Omat suodattimet", diff --git a/app/locales/taiga/locale-fr.json b/app/locales/taiga/locale-fr.json index d97d468d..d623a17b 100644 --- a/app/locales/taiga/locale-fr.json +++ b/app/locales/taiga/locale-fr.json @@ -222,6 +222,7 @@ "PRIORITIES": "Priorités", "TAGS": "Mots-clés", "ASSIGNED_TO": "Affecté à", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Rôle", "CREATED_BY": "Créé par", "CUSTOM_FILTERS": "Filtres personnalisés", diff --git a/app/locales/taiga/locale-it.json b/app/locales/taiga/locale-it.json index 526410a7..923eb7b1 100644 --- a/app/locales/taiga/locale-it.json +++ b/app/locales/taiga/locale-it.json @@ -222,6 +222,7 @@ "PRIORITIES": "Priorità", "TAGS": "Tag", "ASSIGNED_TO": "Assegnato a", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Ruolo", "CREATED_BY": "Creato da", "CUSTOM_FILTERS": "Filtri personalizzati", diff --git a/app/locales/taiga/locale-ja.json b/app/locales/taiga/locale-ja.json index 1d7cdfd7..8748eab8 100644 --- a/app/locales/taiga/locale-ja.json +++ b/app/locales/taiga/locale-ja.json @@ -222,6 +222,7 @@ "PRIORITIES": "優先度", "TAGS": "タグ", "ASSIGNED_TO": "割当", + "ASSIGNED_USERS": "割当ユーザー", "ROLE": "役割", "CREATED_BY": "作成者", "CUSTOM_FILTERS": "カスタムフィルター", diff --git a/app/locales/taiga/locale-ko.json b/app/locales/taiga/locale-ko.json index c42e3d5b..75a229b6 100644 --- a/app/locales/taiga/locale-ko.json +++ b/app/locales/taiga/locale-ko.json @@ -222,6 +222,7 @@ "PRIORITIES": "우선순위", "TAGS": "태그", "ASSIGNED_TO": "할당됨", + "ASSIGNED_USERS": "Assigned users", "ROLE": "역할", "CREATED_BY": "생성함", "CUSTOM_FILTERS": "사용자 정의 필터", diff --git a/app/locales/taiga/locale-nb.json b/app/locales/taiga/locale-nb.json index 30060005..9412121e 100644 --- a/app/locales/taiga/locale-nb.json +++ b/app/locales/taiga/locale-nb.json @@ -222,6 +222,7 @@ "PRIORITIES": "Prioriteter", "TAGS": "Etiketter", "ASSIGNED_TO": "Tildelt til", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Rolle", "CREATED_BY": "Laget av", "CUSTOM_FILTERS": "Egendefinert filtre", diff --git a/app/locales/taiga/locale-nl.json b/app/locales/taiga/locale-nl.json index d8d03e29..cf6cd801 100644 --- a/app/locales/taiga/locale-nl.json +++ b/app/locales/taiga/locale-nl.json @@ -222,6 +222,7 @@ "PRIORITIES": "Prioriteit", "TAGS": "Tags", "ASSIGNED_TO": "Toegewezen aan", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Rol", "CREATED_BY": "Aangemaakt door", "CUSTOM_FILTERS": "Eigen filters", diff --git a/app/locales/taiga/locale-pl.json b/app/locales/taiga/locale-pl.json index 359c0fae..fb82d101 100644 --- a/app/locales/taiga/locale-pl.json +++ b/app/locales/taiga/locale-pl.json @@ -222,6 +222,7 @@ "PRIORITIES": "Priorytety", "TAGS": "Tagi", "ASSIGNED_TO": "Przypisane do", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Rola", "CREATED_BY": "Stworzona przez", "CUSTOM_FILTERS": "Filtry niestandardowe", diff --git a/app/locales/taiga/locale-pt-br.json b/app/locales/taiga/locale-pt-br.json index 50c99ea4..2b0154d3 100644 --- a/app/locales/taiga/locale-pt-br.json +++ b/app/locales/taiga/locale-pt-br.json @@ -222,6 +222,7 @@ "PRIORITIES": "Prioridades", "TAGS": "Tags", "ASSIGNED_TO": "Atribuído a", + "ASSIGNED_USERS": "Usuários atribuídos", "ROLE": "Função", "CREATED_BY": "Criado por", "CUSTOM_FILTERS": "Filtros personalizados", diff --git a/app/locales/taiga/locale-ru.json b/app/locales/taiga/locale-ru.json index 7bee1cbc..55142dc8 100644 --- a/app/locales/taiga/locale-ru.json +++ b/app/locales/taiga/locale-ru.json @@ -222,6 +222,7 @@ "PRIORITIES": "Приоритеты", "TAGS": "Тэги", "ASSIGNED_TO": "Назначено", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Роль", "CREATED_BY": "Создано", "CUSTOM_FILTERS": "Собственные фильтры", diff --git a/app/locales/taiga/locale-sv.json b/app/locales/taiga/locale-sv.json index af87a200..3d1ea1a0 100644 --- a/app/locales/taiga/locale-sv.json +++ b/app/locales/taiga/locale-sv.json @@ -222,6 +222,7 @@ "PRIORITIES": "Prioritet", "TAGS": "Etiketter", "ASSIGNED_TO": "Tilldelad till", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Roll", "CREATED_BY": "Skapad av", "CUSTOM_FILTERS": "Anpassad filter", diff --git a/app/locales/taiga/locale-tr.json b/app/locales/taiga/locale-tr.json index 3cc52b4e..1a8e6b12 100644 --- a/app/locales/taiga/locale-tr.json +++ b/app/locales/taiga/locale-tr.json @@ -222,6 +222,7 @@ "PRIORITIES": "Öncelikler", "TAGS": "Etiketler ", "ASSIGNED_TO": "Atanmış", + "ASSIGNED_USERS": "Assigned users", "ROLE": "Rol", "CREATED_BY": "Oluşturan", "CUSTOM_FILTERS": "Özel filtreler", diff --git a/app/locales/taiga/locale-zh-hans.json b/app/locales/taiga/locale-zh-hans.json index 0e7426ab..a8a901e3 100644 --- a/app/locales/taiga/locale-zh-hans.json +++ b/app/locales/taiga/locale-zh-hans.json @@ -222,6 +222,7 @@ "PRIORITIES": "优先级", "TAGS": "标签", "ASSIGNED_TO": "指派给", + "ASSIGNED_USERS": "被指派人列表", "ROLE": "角色", "CREATED_BY": "由创建", "CUSTOM_FILTERS": "定制过滤器", diff --git a/app/locales/taiga/locale-zh-hant.json b/app/locales/taiga/locale-zh-hant.json index bf89fb0d..fc83e3d3 100644 --- a/app/locales/taiga/locale-zh-hant.json +++ b/app/locales/taiga/locale-zh-hant.json @@ -222,6 +222,7 @@ "PRIORITIES": "優先性", "TAGS": "標籤", "ASSIGNED_TO": "指派給 ", + "ASSIGNED_USERS": "Assigned users", "ROLE": "角色", "CREATED_BY": "由創建", "CUSTOM_FILTERS": "客製過濾器 ", From a14704ddce8efc08eb0557bd71fa60a23f58b73f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Hermida?= Date: Wed, 27 Jun 2018 17:46:37 +0200 Subject: [PATCH 6/8] Update change log --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2dd1d6c..11419aa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +## 3.3.11 (2018-06-27) + +### Misc + +- Fix debounce load US's +- Fix RTL style bug + ## 3.3.10 (2018-06-21) ### Misc From abb2374960201fb664caa417a7f55acfdb7ddb87 Mon Sep 17 00:00:00 2001 From: Miguel Gonzalez Date: Thu, 28 Jun 2018 08:55:20 +0200 Subject: [PATCH 7/8] Revert "Add assigned users filter" This reverts commit 867ddb5fd0172dda31fb2db6b38cd672b1422247. --- app/coffee/modules/controllerMixins.coffee | 20 +++---------------- .../modules/kanban/kanban-usertories.coffee | 12 +++++------ app/locales/taiga/locale-en.json | 1 - 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/app/coffee/modules/controllerMixins.coffee b/app/coffee/modules/controllerMixins.coffee index 4c8df028..a21d0d2b 100644 --- a/app/coffee/modules/controllerMixins.coffee +++ b/app/coffee/modules/controllerMixins.coffee @@ -223,7 +223,6 @@ class UsFiltersMixin loadFilters.project = @scope.projectId loadFilters.tags = urlfilters.tags loadFilters.status = urlfilters.status - loadFilters.assigned_users = urlfilters.assigned_users loadFilters.assigned_to = urlfilters.assigned_to loadFilters.owner = urlfilters.owner loadFilters.epic = urlfilters.epic @@ -250,15 +249,6 @@ class UsFiltersMixin return it tagsWithAtLeastOneElement = _.filter tags, (tag) -> return tag.count > 0 - assignedUsers = _.map data.assigned_users, (it) -> - if it.id - it.id = it.id.toString() - else - it.id = "null" - - it.name = it.full_name || "Unassigned" - - return it assignedTo = _.map data.assigned_to, (it) -> if it.id it.id = it.id.toString() @@ -302,10 +292,6 @@ class UsFiltersMixin selected = @.formatSelectedFilters("tags", tags, loadFilters.tags) @.selectedFilters = @.selectedFilters.concat(selected) - if loadFilters.assigned_users - selected = @.formatSelectedFilters("assigned_users", assignedUsers, loadFilters.assigned_users) - @.selectedFilters = @.selectedFilters.concat(selected) - if loadFilters.assigned_to selected = @.formatSelectedFilters("assigned_to", assignedTo, loadFilters.assigned_to) @.selectedFilters = @.selectedFilters.concat(selected) @@ -338,9 +324,9 @@ class UsFiltersMixin totalTaggedElements: tagsWithAtLeastOneElement.length }, { - title: @translate.instant("COMMON.FILTERS.CATEGORIES.ASSIGNED_USERS"), - dataType: "assigned_users", - content: assignedUsers + title: @translate.instant("COMMON.FILTERS.CATEGORIES.ASSIGNED_TO"), + dataType: "assigned_to", + content: assignedTo }, { title: @translate.instant("COMMON.FILTERS.CATEGORIES.ROLE"), diff --git a/app/coffee/modules/kanban/kanban-usertories.coffee b/app/coffee/modules/kanban/kanban-usertories.coffee index 5f89f29a..477bc92b 100644 --- a/app/coffee/modules/kanban/kanban-usertories.coffee +++ b/app/coffee/modules/kanban/kanban-usertories.coffee @@ -95,7 +95,7 @@ class KanbanUserstoriesService extends taiga.Service move: (usList, statusId, index) -> initialLength = usList.length - + usByStatus = _.filter @.userstoriesRaw, (it) => return it.status == statusId @@ -130,19 +130,19 @@ class KanbanUserstoriesService extends taiga.Service previousWithTheSameOrder = _.filter(beforeDestination, (it) => it.kanban_order == @.order[previous.id] - ) + ) for it, key in afterDestination # increase position of the us after the dragged us's @.order[it.id] = @.order[previous.id] + key + initialLength + 1 - it.kanban_order = @.order[it.id] + it.kanban_order = @.order[it.id] setNextOrders = _.map(afterDestination, (it) => {us_id: it.id, order: @.order[it.id]} - ) + ) # we must send the USs previous to the dropped USs to tell the backend # which USs are before the dropped USs, if they have the same value to # order, the backend doens't know after which one do you want to drop - # the USs + # the USs if previousWithTheSameOrder.length > 1 setPreviousOrders = _.map(previousWithTheSameOrder, (it) => {us_id: it.id, order: @.order[it.id]} @@ -153,7 +153,7 @@ class KanbanUserstoriesService extends taiga.Service us.kanban_order = startIndex + key @.order[us.id] = us.kanban_order - modifiedUs.push({us_id: us.id, order: us.kanban_order}) + modifiedUs.push({us_id: us.id, order: us.kanban_order}) @.refresh() diff --git a/app/locales/taiga/locale-en.json b/app/locales/taiga/locale-en.json index 82c97e4a..6af3550e 100644 --- a/app/locales/taiga/locale-en.json +++ b/app/locales/taiga/locale-en.json @@ -221,7 +221,6 @@ "PRIORITIES": "Priorities", "TAGS": "Tags", "ASSIGNED_TO": "Assigned to", - "ASSIGNED_USERS": "Assigned users", "ROLE": "Role", "CREATED_BY": "Created by", "CUSTOM_FILTERS": "Custom filters", From 723aa782d6fc0200bf385cf2b53209e41522eb55 Mon Sep 17 00:00:00 2001 From: Miguel Gonzalez Date: Thu, 28 Jun 2018 09:38:02 +0200 Subject: [PATCH 8/8] Update change log --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11419aa8..afeba0b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +## 3.3.12 (2018-06-27) + +### Misc + +- Temporary remove assigned users filters. + ## 3.3.11 (2018-06-27) ### Misc