From 645d049399a6b6c9c18d82e666f9f43a3c02b6bf Mon Sep 17 00:00:00 2001 From: tonytusharjr Date: Fri, 10 Jun 2022 08:42:27 -0500 Subject: [PATCH 1/3] add not statement for multi touch resolution metric --- models/zendesk__ticket_metrics.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/zendesk__ticket_metrics.sql b/models/zendesk__ticket_metrics.sql index 73f2d2c9..0f85aaa6 100644 --- a/models/zendesk__ticket_metrics.sql +++ b/models/zendesk__ticket_metrics.sql @@ -122,7 +122,8 @@ select then true else false end as is_two_touch_resolution, - case when lower(ticket_enriched.status) in ('solved','closed') and not ticket_comments.is_one_touch_resolution + case when lower(ticket_enriched.status) in ('solved','closed') and not ticket_comments.is_one_touch_resolution + and not ticket_comments.is_two_touch_resolution then true else false end as is_multi_touch_resolution From 371918e6326151f39921a6f6ac99de4a58d0391f Mon Sep 17 00:00:00 2001 From: tonytusharjr Date: Fri, 10 Jun 2022 08:48:28 -0500 Subject: [PATCH 2/3] update changelog, update package versions in project ymls --- CHANGELOG.md | 3 +++ dbt_project.yml | 2 +- integration_tests/dbt_project.yml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a07c026..02dc70d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# dbt_zendesk v0.8.4 +## Bug Fix +- Quick fix on missing logic in the case statement for determining multi-touch resolution metrics. # dbt_zendesk v0.8.3 ## Features - This [Zendesk Source package](https://github.com/fivetran/dbt_zendesk_source) now allows for custom fields to be added to the `stg_zendesk__ticket` model. These custom fields will also persist downstream to the `zendesk__ticket_enriched` and `zendesk__ticket_metrics` models. You may now add your own customer fields to these models by leveraging the `zendesk__ticket_passthrough_columns` variable. ([#70](https://github.com/fivetran/dbt_zendesk/pull/70)) diff --git a/dbt_project.yml b/dbt_project.yml index 9a707cc1..9f5fb08e 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'zendesk' -version: '0.8.3' +version: '0.8.4' config-version: 2 require-dbt-version: [">=1.0.0", "<2.0.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index f3b2b1d5..aa4693af 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'zendesk_integration_tests' -version: '0.8.3' +version: '0.8.4' profile: 'integration_tests' From 635caca8e661f77620139abcaa8f85695fad5ce8 Mon Sep 17 00:00:00 2001 From: tonytusharjr Date: Fri, 10 Jun 2022 09:46:49 -0500 Subject: [PATCH 3/3] fix submitter role case statement --- models/zendesk__ticket_enriched.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/zendesk__ticket_enriched.sql b/models/zendesk__ticket_enriched.sql index 9279995a..f772b7be 100644 --- a/models/zendesk__ticket_enriched.sql +++ b/models/zendesk__ticket_enriched.sql @@ -93,7 +93,7 @@ with ticket as ( requester_org.updated_at as requester_organization_updated_at, submitter.external_id as submitter_external_id, submitter.role as submitter_role, - case when submitter.role in ('Agent','Admin') + case when submitter.role in ('agent','admin') then true else false end as is_agent_submitted,