From 34bcc21296c28d42d39e198ec96a6722c87aa441 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Thu, 29 Apr 2021 09:59:54 +0000 Subject: [PATCH] Fixes #3479 - Customer overview doesn't load on change. --- .../app/controllers/ticket_overview.coffee | 5 +++-- spec/system/ticket/view_spec.rb | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 7a94d4495..5e7e393f9 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -1373,8 +1373,9 @@ class BulkForm extends App.Controller @configure_attributes_ticket.push localAttribute time_attribute = _.findWhere(@configure_attributes_ticket, {'name': 'pending_time'}) - time_attribute.orientation = 'top' - time_attribute.disableScroll = true + if time_attribute + time_attribute.orientation = 'top' + time_attribute.disableScroll = true @holder = @options.holder @visible = false diff --git a/spec/system/ticket/view_spec.rb b/spec/system/ticket/view_spec.rb index af6c6be91..6e9c82d32 100644 --- a/spec/system/ticket/view_spec.rb +++ b/spec/system/ticket/view_spec.rb @@ -170,4 +170,21 @@ RSpec.describe 'Ticket views', type: :system do end end end + + context 'Customer', authenticated_as: :authenticate do + let(:customer) { create(:customer, :with_org) } + let(:ticket) { create(:ticket, customer: customer) } + + def authenticate + ticket + customer + end + + it 'does basic view test of tickets' do + visit 'ticket/view/my_tickets' + expect(page).to have_text(ticket.title) + click_on 'My Organization Tickets' + expect(page).to have_text(ticket.title) + end + end end