-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Business hours + schedule holiday fixes #114
Business hours + schedule holiday fixes #114
Conversation
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
…licate_sla_event_ids
Bugfix/duplicate sla event ids
Duplicate SLA fixes have been rolled into this branch so we may roll them out together as they both were reliant on the other updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still validating the requester and agent wait time in business minutes, but I feel they are going to tie out! I just have a few minor requests to push doc changes before this is ready to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This morning I was able to validate the requester and agent wait time in business hours tie out to the Zendesk UI! This looks good to go now. Great work team!
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
…ub.com/fivetran/dbt_zendesk into bug/agent-work-time-schedule-holiday-3
PR Overview
This PR will address the following Issue/Feature:
This PR will result in the following new package version:
v0.12.0
Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:
int_schedule_spine
was updated to take daylight savings time into account when merging schedule periods. Previously, schedule periods with different start_time_utcs (because of DST) were getting merged together.double_gap logic
as it was rendered unnecessary by our changes. it was necessary before because we used to look backward in time to merge gap periods, whereas now we look forward in time and will keep merging gaps until we get to the present dayint_schedule_spine
was also updated to create more appropriate valid_until's for holiday periods. previously, we calculated the end of holiday day by adding24*60*60-1
seconds (making the end the last second of the same day). this worked before because our downstream joins for calculating business metrics were inclusive (ie>=
instead of>
). we've updated these joins to be exclusive (ie>
or<
) so we need to set the end of the holiday to truly be the end of the day. Thus, i've updated the holiday_end_at to be calculated by adding24*60*60
seconds to theholiday_start
business_hours
models, i've updated the join logic in theintercepted_periods
CTE. this is where we associate ticket weekly periods with the appropriate business schedule, in order to generate business minutes. previously, we did so by comparing thestatus_valid_starting_at
andstatus_valid_ending_at
fields to the schedulevalid_from
andvalid_until
. this was causing fanout in the join, as we needed to takeweek_number
into account, given that the grain of the previous CTE was ticket+status+week. I don't know if i can explain that better, but it was an issue!ticket_week_start_time
andticket_week_end_time
fields instead of the timestampstatus_valid_starting/ending_at
fields in our join comparison. We take the start of first weekly period and addweek_number * 7 * 24 * 60 (min in a week) + ticket_week_start/end_time
to most accurately compare against the schedulevalid_from/until
int_zendesk__requester_wait_time_filtered_statuses
to include thehold
status, since zendesk updatedon-hold
to justhold
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":
Lots of validation via slack with the @cth84 for business minutes
I've also compared our internal zendesk data before-and-after (calendar minutes only) and everything except the
total_reply_time_calendar_minutes
is tying out (there are 26 tickets that are off). shared the exact query i used for this in Slack.I have not compared the sla_policy metrics however, as I imagine @fivetran-reneeli's changes will be affect things there.
Standard Updates
Please acknowledge that your PR contains the following standard updates:
dbt Docs
Please acknowledge that after the above were all completed the below were applied to your branch:
If you had to summarize this PR in an emoji, which would it be?
☠️