Skip to content

Commit

Permalink
Merge pull request #43 from fivetran/feature/add-ticket-handoffs
Browse files Browse the repository at this point in the history
add handoff metric
  • Loading branch information
fivetran-jamie authored Oct 4, 2021
2 parents fc30839 + 94a8418 commit 361653c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'zendesk'
version: '0.6.0'
version: '0.6.1'
config-version: 2
require-dbt-version: [">=0.20.0"]
on-run-start: '{{ fivetran_utils.empty_variable_warning("ticket_field_history_columns", "zendesk_ticket_field_history") }}'
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2

name: 'zendesk_integration_tests'
version: '0.6.0'
version: '0.6.1'

profile: 'integration_tests'

Expand Down
5 changes: 4 additions & 1 deletion models/intermediate/int_zendesk__comment_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ comment_counts as (
then 1
else 0
end) as count_internal_comments,
count(*) as total_comments
count(*) as total_comments,
count(distinct case when commenter_role = 'internal_comment'
then user_id
end) as count_ticket_handoffs
from ticket_comments

group by 1, 2
Expand Down
2 changes: 2 additions & 0 deletions models/zendesk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ models:
description: Count of public comments within the ticket
- name: total_comments
description: Total count of all comments within the ticket
- name: count_ticket_handoffs
dev_snowflake: Count of distinct internal users who have touched/commented on the ticket.
- name: unique_assignee_count
description: The count of unique assignees that were assigned to the ticket
- name: assignee_stations_count
Expand Down
1 change: 1 addition & 0 deletions models/zendesk__ticket_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ select
coalesce(ticket_comments.count_public_comments, 0) as count_public_comments,
coalesce(ticket_comments.count_internal_comments, 0) as count_internal_comments,
coalesce(ticket_comments.total_comments, 0) as total_comments,
coalesce(ticket_comments.count_ticket_handoffs, 0) as count_ticket_handoffs, -- the number of distinct internal users who commented on the ticket
ticket_comments.last_comment_added_at as ticket_last_comment_date,
ticket_resolution_times_calendar.unique_assignee_count,
ticket_resolution_times_calendar.assignee_stations_count,
Expand Down

0 comments on commit 361653c

Please sign in to comment.