Add missing conversation id for first response event (#2922)
- Add missing conversation id for first response event - Fixing the flaky test Fixes #2746 Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
This commit is contained in:
@@ -24,7 +24,8 @@ class EventListener < BaseListener
|
|||||||
value: first_response_time,
|
value: first_response_time,
|
||||||
account_id: conversation.account_id,
|
account_id: conversation.account_id,
|
||||||
inbox_id: conversation.inbox_id,
|
inbox_id: conversation.inbox_id,
|
||||||
user_id: conversation.assignee_id
|
user_id: conversation.assignee_id,
|
||||||
|
conversation_id: conversation.id
|
||||||
)
|
)
|
||||||
event.save
|
event.save
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ describe ::V2::ReportBuilder do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'returns average first response time' do
|
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 = {
|
params = {
|
||||||
metric: 'avg_first_response_time',
|
metric: 'avg_first_response_time',
|
||||||
|
|||||||
Reference in New Issue
Block a user