From ac3bce393201d211b7c972a052e81981255600e5 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 12 Jun 2025 17:58:56 +0530 Subject: [PATCH 1/3] fix: missing metrics and labels from label summary (#11718) --- app/builders/v2/reports/label_summary_builder.rb | 6 ++++-- app/views/api/v2/accounts/reports/labels.csv.erb | 4 +++- config/locales/en.yml | 2 ++ spec/builders/v2/reports/label_summary_builder_spec.rb | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/builders/v2/reports/label_summary_builder.rb b/app/builders/v2/reports/label_summary_builder.rb index abc68b26b..caa5a04d8 100644 --- a/app/builders/v2/reports/label_summary_builder.rb +++ b/app/builders/v2/reports/label_summary_builder.rb @@ -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) diff --git a/app/views/api/v2/accounts/reports/labels.csv.erb b/app/views/api/v2/accounts/reports/labels.csv.erb index fdf578415..a9d420155 100644 --- a/app/views/api/v2/accounts/reports/labels.csv.erb +++ b/app/views/api/v2/accounts/reports/labels.csv.erb @@ -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 -%> diff --git a/config/locales/en.yml b/config/locales/en.yml index 463aa713e..20c1391cc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 diff --git a/spec/builders/v2/reports/label_summary_builder_spec.rb b/spec/builders/v2/reports/label_summary_builder_spec.rb index 7a5a589dd..1560008a1 100644 --- a/spec/builders/v2/reports/label_summary_builder_spec.rb +++ b/spec/builders/v2/reports/label_summary_builder_spec.rb @@ -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) From e54e80a936325fe43dbbc042fa6adea5a6b27fb9 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 12 Jun 2025 18:01:12 +0530 Subject: [PATCH 2/3] fix: Display "To" in email meta header on outgoing messages (#11717) --- .../components-next/message/bubbles/Email/EmailMeta.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/dashboard/components-next/message/bubbles/Email/EmailMeta.vue b/app/javascript/dashboard/components-next/message/bubbles/Email/EmailMeta.vue index f4b863e64..905819ce6 100644 --- a/app/javascript/dashboard/components-next/message/bubbles/Email/EmailMeta.vue +++ b/app/javascript/dashboard/components-next/message/bubbles/Email/EmailMeta.vue @@ -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(() => { From 58380c6d0167f09e326aa83052ead0c8c8304061 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Fri, 13 Jun 2025 02:59:28 +0530 Subject: [PATCH 3/3] fix: Hide Copilot launcher on inbox view message screen (#11723) # Pull Request Template ## Description This PR will hide Copilot launcher button on inbox view message screen. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? ### Screenshots **Before** image **After** image image ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --- .../dashboard/components-next/copilot/CopilotLauncher.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/dashboard/components-next/copilot/CopilotLauncher.vue b/app/javascript/dashboard/components-next/copilot/CopilotLauncher.vue index c0766f382..e21c550c0 100644 --- a/app/javascript/dashboard/components-next/copilot/CopilotLauncher.vue +++ b/app/javascript/dashboard/components-next/copilot/CopilotLauncher.vue @@ -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); });