diff --git a/app/listeners/event_listener.rb b/app/listeners/event_listener.rb index fd072e81d..8e7fd0daf 100644 --- a/app/listeners/event_listener.rb +++ b/app/listeners/event_listener.rb @@ -24,7 +24,8 @@ class EventListener < BaseListener value: first_response_time, account_id: conversation.account_id, inbox_id: conversation.inbox_id, - user_id: conversation.assignee_id + user_id: conversation.assignee_id, + conversation_id: conversation.id ) event.save end diff --git a/spec/builders/v2/report_builder_spec.rb b/spec/builders/v2/report_builder_spec.rb index 2cf75103a..8506c88f6 100644 --- a/spec/builders/v2/report_builder_spec.rb +++ b/spec/builders/v2/report_builder_spec.rb @@ -215,7 +215,7 @@ describe ::V2::ReportBuilder do end it 'returns average first response time' do - FactoryBot.create(:event, conversation: label_2.conversations.last, account: account, name: 'first_response') + label_2.events.update(value: 1.5) params = { metric: 'avg_first_response_time',