18F / tock

We use Tock to track and report our time at 18F
https://18f.gsa.gov/2015/05/21/TockingTime/
Other
121 stars 37 forks source link

Utilization overview #1625

Closed jduss4 closed 1 year ago

jduss4 commented 1 year ago

Description

Adds weekly allocation estimated hour equivalent into existing queries / structures that calculate utilization across time and organizations. That is, where previously only hours_billed was being used for the utilization page, now we also include total_allocation_hours to combine into a billable annotation.

Updated tests where necessary and created new tests for time (monthly utilization with two timecards) and organization (all timecards from last week).

Closes https://github.com/18F/tock/issues/1592

Additional information

Compare the utilization for two users before and after this change. The utilization and billed hours (numerator) change, because weekly allocation's estimated hours are being added to the mix.

On current main branch: image

This branch: image

NOTE Older timecards with incorrect target_hours will appear with inflated utilization

This change does not appear to change any of the analytics pages or visualizations

codecov-commenter commented 1 year ago

Codecov Report

Merging #1625 (50a37e7) into main (031595c) will increase coverage by 0.02%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1625      +/-   ##
==========================================
+ Coverage   94.11%   94.14%   +0.02%     
==========================================
  Files          66       66              
  Lines        4115     4135      +20     
==========================================
+ Hits         3873     3893      +20     
  Misses        242      242              

see 2 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jduss4 commented 1 year ago

Hold off on merging this until we can discuss how the estimated hours for weekly allocation are being calculated

jduss4 commented 1 year ago

Let me know if you'd like me to squash the commits!