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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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
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.

1 participant