Browse Source

Fixes #3479 - Customer overview doesn't load on change.

Rolf Schmidt 3 years ago
parent
commit
34bcc21296

+ 3 - 2
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

+ 17 - 0
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