From 35ac76a6f6a3623381028a96d5e913e4be504cbb Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Thu, 27 Apr 2017 11:26:20 +0200 Subject: [PATCH] Removed open ticket from list of related tickets (#655). --- app/controllers/tickets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/tickets_controller.rb b/app/controllers/tickets_controller.rb index b50a40c9e..74d913bd3 100644 --- a/app/controllers/tickets_controller.rb +++ b/app/controllers/tickets_controller.rb @@ -299,7 +299,7 @@ class TicketsController < ApplicationController } ticket_ids_recent_viewed = [] - recent_views = RecentView.list(current_user, 8, 'Ticket') + recent_views = RecentView.list(current_user, 8, 'Ticket').delete_if{|object| object['o_id'] == ticket.id } recent_views.each { |recent_view| next if recent_view['object'] != 'Ticket' ticket_ids_recent_viewed.push recent_view['o_id']