fix: calculation for resolution count (#7293)
* fix: calculation for resolution count * test: resolution count bug fix - ensure enqueued jobs are run - fix the dates check, conversations resolved today should show up in today * feat: ensure conversations are resolved * test: do not count extra events if the conversation is not resolved currently * fix: typo
This commit is contained in:
@@ -29,7 +29,9 @@ module ReportHelper
|
||||
end
|
||||
|
||||
def resolutions_count
|
||||
(get_grouped_values scope.conversations.where(account_id: account.id).resolved).count
|
||||
object_scope = scope.reporting_events.joins(:conversation).select(:conversation_id).where(account_id: account.id, name: :conversation_resolved,
|
||||
conversations: { status: :resolved }).distinct
|
||||
(get_grouped_values object_scope).count
|
||||
end
|
||||
|
||||
def avg_first_response_time
|
||||
|
||||
Reference in New Issue
Block a user