Merge branch 'develop' into feat/github-integration

This commit is contained in:
Muhsin Keloth
2025-06-13 10:54:32 +05:30
committed by GitHub
6 changed files with 13 additions and 5 deletions
@@ -31,7 +31,7 @@ class V2::Reports::LabelSummaryBuilder < V2::Reports::BaseSummaryBuilder
resolved_counts: fetch_resolved_counts(conversation_filter),
resolution_metrics: fetch_metrics(conversation_filter, 'conversation_resolved', use_business_hours),
first_response_metrics: fetch_metrics(conversation_filter, 'first_response', use_business_hours),
reply_metrics: fetch_metrics(conversation_filter, 'reply', use_business_hours)
reply_metrics: fetch_metrics(conversation_filter, 'reply_time', use_business_hours)
}
end
@@ -63,7 +63,9 @@ class V2::Reports::LabelSummaryBuilder < V2::Reports::BaseSummaryBuilder
end
def fetch_resolved_counts(conversation_filter)
fetch_counts(conversation_filter.merge(status: :resolved))
# since the base query is ActsAsTaggableOn,
# the status :resolved won't automatically be converted to integer status
fetch_counts(conversation_filter.merge(status: Conversation.statuses[:resolved]))
end
def fetch_counts(conversation_filter)
@@ -19,6 +19,7 @@ const isConversationRoute = computed(() => {
'conversation_through_mentions',
'conversation_through_unattended',
'conversation_through_participating',
'inbox_view_conversation',
];
return CONVERSATION_ROUTES.includes(route.name);
});
@@ -14,7 +14,8 @@ const fromEmail = computed(() => {
});
const toEmail = computed(() => {
return contentAttributes.value?.email?.to ?? [];
const { toEmails, email } = contentAttributes.value;
return email?.to ?? toEmails ?? [];
});
const ccEmail = computed(() => {
@@ -4,7 +4,9 @@
I18n.t('reports.label_csv.label_title'),
I18n.t('reports.label_csv.conversations_count'),
I18n.t('reports.label_csv.avg_first_response_time'),
I18n.t('reports.label_csv.avg_resolution_time')
I18n.t('reports.label_csv.avg_resolution_time'),
I18n.t('reports.label_csv.avg_reply_time'),
I18n.t('reports.label_csv.resolution_count'),
]
%>
<%= CSVSafe.generate_line headers -%>
+2
View File
@@ -105,6 +105,8 @@ en:
conversations_count: No. of conversations
avg_first_response_time: Avg first response time
avg_resolution_time: Avg resolution time
avg_reply_time: Avg reply time
resolution_count: Resolution Count
team_csv:
team_name: Team name
conversations_count: Conversations count
@@ -140,7 +140,7 @@ RSpec.describe V2::Reports::LabelSummaryBuilder do
create(:reporting_event,
account: account,
conversation: conv,
name: 'reply',
name: 'reply_time',
value: (15 + (idx * 5)) * 60,
value_in_business_hours: (10 + (idx * 3)) * 60,
created_at: Time.zone.today)