Skip to content
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

refactor(case): Refactor case cost model. #5529

Merged
merged 10 commits into from
Dec 18, 2024

Conversation

metroid-samus
Copy link
Contributor

Previously case cost response calculation involved the following steps:

  1. Retrieve: most recent recorded case response cost.
  2. Aggregate all new participant response time since the last time we updated that response cost
  3. Add the results from steps 1 and 2
  4. Write over the recorded incident response cost by multiplying the result from step 3 with the employee hourly rate

This PR updates the case cost calculation by recalculating the case response cost from beginning to end based on all logged participant activities.

This reduces accumulated rounding errors.

@metroid-samus metroid-samus added the enhancement New feature or request label Nov 23, 2024
@metroid-samus metroid-samus self-assigned this Nov 23, 2024
@metroid-samus metroid-samus added techdebt and removed enhancement New feature or request labels Nov 23, 2024
@metroid-samus metroid-samus marked this pull request as ready for review November 23, 2024 00:13
@metroid-samus metroid-samus merged commit de78894 into master Dec 18, 2024
9 checks passed
@metroid-samus metroid-samus deleted the enhancement/refactor-case-cost-model branch December 18, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants