[BB-8214] Add support for toggling inclusion of actuals in sustainability calculations
Story
"As a sustainability manager, I want to be able to include/exclude actuals from individual accounts in/from sustainability calculations so that I can review their impact on sustainability quickly and easily."
Full description
In the context of tracking and reviewing sustainability at cell and company level it is useful (and sometimes necessary) to understand how the amount of time logged against a given account (or set of accounts) over a certain period of time impacted the sustainability ratio for that period.
At the moment, this requires performing some calculations manually which is time-consuming and potentially error-prone.
To address this, we should add functionality for toggling inclusion of actuals in sustainability calculations via SprintCraft's UI.
In particular, we should add a new column titled Include? (or similar) to the Budget dashboard that shows a checkbox next to the Period Spent value for each account.
- Each checkbox should be checked by default. In other words, numbers shown on the Sustainability dashboard should initially take into account actuals from all accounts listed on the Budget dashboard. This matches current behavior.
- When unchecking a given checkbox:
- Numbers shown on the Sustainability dashboard should be updated such that they exclude the corresponding actual:
Total hours -= actual-
Billable hours -= actualif actual belongs to a billable account -
Non-billable hours -= actualif actual belongs to a non-billable account -
% non-billable = Non-billable hours / Total hours(recalculate after updatingTotal hoursandNon-billable hoursas shown above) -
Remaining non-billable hours = ((Billable hours * <sustainability target>) / (1 - <sustainability target>)) - Non-billable hours(recalculate after updatingBillable hoursandNon-billable hoursas shown above)
- The corresponding row on the Budget dashboard should be greyed out.
- Numbers shown on the Sustainability dashboard should be updated such that they exclude the corresponding actual:
- When checking a previously-unchecked checkbox, the steps above should be reversed:
- Numbers shown on the Sustainability dashboard should be updated such that they include the corresponding actual:
Total hours += actual-
Billable hours += actualif actual belongs to a billable account -
Non-billable hours += actualif actual belongs to a non-billable account -
% non-billable = Non-billable hours / Total hours(recalculate after updatingTotal hoursandNon-billable hoursas shown above) -
Remaining non-billable hours = ((Billable hours * <sustainability target>) / (1 - <sustainability target>)) - Non-billable hours(recalculate after updatingBillable hoursandNon-billable hoursas shown above)
- The corresponding row on the Budget dashboard should no longer be greyed out.
- Numbers shown on the Sustainability dashboard should be updated such that they include the corresponding actual:
Examples of relevant calculations
- Analysis of Falcon's sustainability for Q3 2023 (scroll down to and expand Detailed calculations)
- Analysis of Bebop's sustainability for Q3 2023 (scroll down to and expand Detailed calculations)
Completion criteria
- Implement functionality for toggling inclusion of account actuals as described above.
- Create PRs as necessary.
- Deploy changes.
Documentation updates & improvements criteria
- Update documentation for Budget dashboard and Sustainability dashboard to include functionality for toggling inclusion of account actuals.