-
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
[Bug] Agent Work Time in Business Minutes (zendesk__ticket_metrics) #107
Comments
Hi @cth84 thanks for opening this issue and digging into the nuances you are experiencing with the new schedule_holiday addition. There for sure seems to be something going awry that we will want to address. I appreciate you digging into identifying the source of the issue seems to stem from the join in the int_zendesk__ticket_work_time_business model dbt_zendesk/models/agent_work_time/int_zendesk__ticket_work_time_business.sql Lines 84 to 102 in 31d6a5f
It is peculiar how we did not edit this model directly in the schedule holiday update. The only update that would impact this model are the changes to the I am curious about the intercepted_periods results you are seeing as well. Would you be chance be able to share a sample of the ticket_id in question for the results of the intercepted_periods cte (you can grab the sql from your target/compiled folder and modify the sql for the model to only output the intercepted_period cte. The above will help us identify and resolve the issue you are seeing. Thanks again for raising this to our attention and for working with us to resolve the issue. |
Thanks for the assistance Joe!
Nothing appears to be off with the records in This issue only appears to be happening on tickets that span a weekend, in which we change schedules (holiday week to non-holiday week or vice versa) If a ticket started and finished within the week (holiday or not), no issue
Here are the raw results, for this ticket, from the |
Thanks for providing these additional details this is extremely helpful. I can see in the spreadsheet you provided that it does look like the Just to confirm for this ticket we should essentially see I believe this will be better triaged further over a live call if you are open to meeting with me? If so, you can schedule time with myself and my team via our Calendly. Let me know if these times don't work for you and we can schedule a time that works best for you. Thank you again and I look forward to resolving this issue you are seeing 😄 |
Correct! I think the duplication is occurring because there doesn't appear to be any logic to split ticket status time across multiple schedules if it happens to cross over. Here is a more extreme example of a ticket we had open for a 2 months (and it spanned 5 schedule changes due to holidays). Comparing its agent work time to full resolution in business minutes, we see it grow by a factor of ~5. I grabbed some time next week for us, |
Thanks so much for sharing an additional example and for scheduling time next week to discuss in more detail. I look forward to chatting then and coming to a resolution to be applied in the package! |
Is there an existing issue for this?
Describe the issue
We are evaluating the inclusion of schedules with v0.11.0 and noticed that
agent_work_time_in_business_minutes
for some tickets is showing higher than thefull_resolution_business_minutes
on thezendesk__ticket_metrics
model. In these situations, the number is also higher than our existing production values using the v0.10.2 of the package.We dug in and it looks like the issue is within the
int_zendesk__ticket_work_time_business
model.The
intercepted_periods
cte which joins across theweekly_periods
andschedule
ctes seems to be where the issue takes place.It is joining the status the ticket was in, going into the weekend, to both the week before (a holiday week) and the week after (non-holiday) and then counting that time twice (or multiple times if ticket was in a status over multiple schedules changes).
Relevant error log or model output
No response
Expected behavior
If a ticket status spans a weekend, in which the schedule changes, I would expect the ticket's status time to be properly aligned/split to each of those schedules.
dbt Project configurations
n/a
Package versions
packages:
version: 1.0.0
version: 0.7.4
version: 0.12.2
version: 0.7.0
version: 0.9.0
version: 0.11.0
What database are you using dbt with?
bigquery
dbt Version
Core:
Plugins:
Additional Context
This is a simple example ticket, that was opened at the end of a holiday week on Friday, after our business hours, then worked/solved on the following Monday.
The time it was open on Monday, seems to be applied twice, once to the prior schedule and then the current.
Ticket 110116-example.xlsx
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: