From e5ba41892a772c8f4053c3cb905bc815278faabc Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 8 Feb 2017 01:53:38 +0100 Subject: [PATCH] Only show active macros, groups and users. --- .../javascripts/app/controllers/ticket_overview.coffee | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index bed37ffd7..6f2ea235b 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -470,8 +470,8 @@ class App.TicketOverview extends App.Controller @delay(update, 2800, 'overview:fetch') renderOptions: => - macros = App.Macro.all() - groups = App.Group.all() + macros = App.Macro.findAllByAttribute('active', true) + groups = App.Group.findAllByAttribute('active', true) users = [] items = @el.find('[name="bulk"]:checked') @@ -495,8 +495,10 @@ class App.TicketOverview extends App.Controller delete possibleUsers[user_id.toString()] possibleUserGroups[ticket.group_id.toString()] = true for user_id, _exists of possibleUsers - user = App.User.find(user_id) - users.push user + if App.User.exists(user_id) + user = App.User.find(user_id) + if user.active is true + users.push user ### users = [ App.User.find(2),