-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: add business_hours support for sla evaluation #9470
base: develop
Are you sure you want to change the base?
Conversation
🐢 Turtley slow progress alert! This pull request has been idle for over 30 days. Can we please speed things up and either merge it or release it back into the wild? |
def calculate_threshold(start_time, threshold_seconds) | ||
if @business_hours_configured | ||
if start_time.in_working_hours? | ||
start_time.to_i + threshold_seconds.working.seconds |
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.
17:46:48 worker.1 | Error performing Sla::ProcessAppliedSlaJob ... TypeError (WorkingHours::Duration can't be coerced into Integer):
17:46:48 worker.1 | /enterprise/app/services/sla/evaluate_applied_sla_service.rb:57:in `+'
17:46:48 worker.1 | /enterprise/app/services/sla/evaluate_applied_sla_service.rb:57:in `calculate_threshold'
17:46:48 worker.1 | /enterprise/app/services/sla/evaluate_applied_sla_service.rb:67:in `check_first_response_time_threshold'
17:46:48 worker.1 | /enterprise/app/services/sla/evaluate_applied_sla_service.rb:45:in `block in check_sla_thresholds'
maybe
threshold_seconds.working.seconds.since(start_time).to_i
instead
start_time.to_i + threshold_seconds.working.seconds
🐢 Turtley slow progress alert! This pull request has been idle for over 30 days. Can we please speed things up and either merge it or release it back into the wild? |
Pull Request Template
Description
business_hour
setting in SLA policiesChangelog
only_during_business_hours
set totrue
.business_hours
, this will be evaluated normallyFixes https://linear.app/chatwoot/issue/CW-3051/handle-business-hours-during-sla-evaluation
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist: