Skip to content

Sustainability

The Sustainability Dashboard and Budget Dashboard (both described below) are aware of the sprint board's current view (whether it's showing cells/cell's board/person's board). Therefore, when you click on the cell's name, the sustainability dashboard recalculates its data for displaying cell/person-related data only.

Sustainability Dashboard

This view allows you to verify the assumptions described in the "Cell Budgets" chapter of our handbook. The key information here is the ratio of non-billable cell hours to billable cell hours. It is calculated in the following way:

each cell ensures that it doesn't exceed a budget of 1h of internal/unbilled budget for every 2.5h the cell bills to clients.

Overall sustainability

Here we can view the sustainability combined for all existing projects. We are listing:

Overall total hours

non-cell hours + cell hours

Billable hours

Total non-billable hours

non-billable cell hours + non-billable non-cell hours

Overall percent of non-billable hours

total non-billable hours / total hours

Cell's/User's sustainability

Here we can view the sustainability logged for a specific project or by a specific user. We are listing:

Total hours

Non-cell hours

hours logged on non-billable non-cell tickets

Billable cell hours

Non-billable cell hours

hours logged on non-billable cell-responsible tickets

Percent of non-billable hours

non-billable_cell_hours / (billable_cell_hours + non-billable_cell_hours)

Remaining non-billable hours

billable_cell_hours * MAX_NON_BILLABLE_TO_BILLABLE_CELL_RATIO / (1 - MAX_NON_BILLABLE_TO_BILLABLE_CELL_RATIO) - non-billable_cell_hours

Budget Dashboard

This presents a list of all active accounts and the time spent on them from the beginning of the current year and the goal, based on the budget stored in the DB (see the Setting up budgets section for setup instructions). For each budget we are listing:

Account name

With the prefix stripped for better readability.

Time spent from the beginning of the first year within the selected period

For Overall view the cell has green background when budget is on track and turns red when it's exceeded. This behavior is disabled on cell's and user's dashboards to reduce confusion.

Goal from the beginning of the first year within the selected period to the end of the next sprint

This field remains the same for all views, because budgets cannot be divided between cells.

Time spent during the selected period

Goal for the selected period

This field remains the same for all views, because budgets cannot be divided between cells.

Time scheduled for the incomplete tickets in the current sprint

Time scheduled for the tickets in the next sprint.

Time that can still be assigned for the next sprint

This field remains the same for all views, because any cell can use the remaining budget. The cell's background is green when remaining time is greater or equal 0, turns red when it's lower.

One of the following categories

  1. Billable.
  2. Non-billable cell.
  3. Non-billable non-cell.

Setting up budgets

To set up the budgets for the accounts you need to:

  1. Log into the backend admin (e.g. http://localhost:8000/admin) with your superuser account.
  2. Go to Sustainability/Budgets.
  3. Add a new budget for the account.

The budgets are rolling, so these entries are perceived as changes of the budgets. It means that the budget for the account with the specified name will be hours (per month) up to the next change or current date.

E.g. we have the account "Account - Security". From the beginning of 2019 we want the budget to be 100h/month, but from September to November (both inclusive) we want to raise it to 200h/month. From December and for the whole 2020 it should be lowered back to 100h/month. Therefore, we need to create 3 entries via the Django admin:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
[{
    "name": "Account - Security",
    "date": "January 2019",
    "hours": 100
}, {
    "name": "Account - Security",
    "date": "September 2019",
    "hours": 200
}, {
    "name": "Account - Security",
    "date": "December 2019",
    "hours": 100
}]

Side note: the date is a DateField, but the example is using simplified representation for brevity.

Setting up alerts

The alerts are defined in settings to be triggered with Celerybeat. It's possible to subscribe to specific cell or account alerts via Django admin.

It's also possible to specify addresses that will receive alerts for all existing cells and accounts. To do this, add email address to NOTIFICATIONS_SUSTAINABILITY_EMAILS environment variable.

Setting up webhooks

The SprintCraft app supports triggering webhooks on certain events. Currently, the following events are supported:

  1. 'new sprint' - Triggered at the end of the sprint completion process. It fires a webhook containing details of each member of the cell & their responsibilities in the new sprint. It reads permanent roles (Sprint Planning Manager etc.) from the ORGANIZATION_DEFINITION_URL, and temporary roles (Firefighter, Discovery Duty etc.) from the rotations spreadsheets. If the FEATURE_CELL_ROLES (disabled by default) environment variable is set to True it will cause an error and prevent the sprint from being completed if the permanent roles cannot be read from the handbook.

In order to set up receivers you first need to set up webhook events; to do that follow these steps:

  1. Go to 'Webhook events' in your Django admin panel (http://localhost:8000/admin/webhooks/webhookevent/).
  2. Click 'Add webhook event' and create events based on the above-mentioned list of events.

For now, only the 'new sprint' event type is supported. More event types will be added in the future.

To create a new webhook receiver, follow these steps:

  1. Make sure a 'Webhook Event' exists for your webhook (see the following section for the instructions).
  2. Go to 'Webhooks' in the Django admin panel (http://localhost:8000/admin/webhooks/webhook/).
  3. Click 'Add Webhook'.
  4. In Events, select one or multiple events to link to the webhook & enter a payload URL. If you'd like to send any extra headers with the request, you can specify them in the header's field using the JSON format.

For sustainability

Alerts are sent when the ratio of non-billable cell hours to billable hours exceeds MAX_NON_BILLABLE_TO_BILLABLE_CELL_RATIO.

By default, these alerts are not being sent. To enable them:

  1. Log into the backend admin (e.g. http://localhost:8000/admin) with your superuser account.
  2. Go to Sustainability/Cells.
  3. Add new cell.
  4. Optionally add comma-separated email addresses that will receive alerts.

For budgets

Alerts are sent when time spent from the beginning of the first year within the selected period is greater than the goal from the beginning of the current year to the end of the next sprint.

Alerts are sent by default to emails specified in MAX_NON_BILLABLE_TO_BILLABLE_CELL_RATIO. To subscribe only to specific accounts:

  1. Log into the backend admin (e.g. http://localhost:8000/admin) with your superuser account.
  2. Go to Sustainability/Accounts.
  3. Add new account.
  4. Specify comma-separated email addresses that will receive alerts.