Content
View differences
Updated by Henriette Darge 3 months ago
**As** a project manager, portfolio manager and program manager
**I want to** see the costs and spent time on my Overview page
**so that** I easily get an overview of the financial plan and status.
# **Motivation**
* Understand how much money was spent.
* Understand the costs incurred.
* Make the project overview more useful and engaging.
* Improve onboarding of OpenProject in general
* Reduce churn of OpenProject in general
# **Acceptance criteria**
* There is a new widget for the Time & Costs module shown on the Overview page only
* Widgets shown only if TIme and Costs module is activated in the project.
* When no time has been logged yet, the widget shows a Blankslate with
* icon: op-cost-reports
* header: Start tracking your time and costs
* Description: Get an overview of the current costs to monitor progress of your project.
* (Primary) Button: `Log time` _\-> /my/time-tracking/_
* The new widget is called "**Time and costs**". It is a stacked bar chart for monthly actual costs:
* Each bar represents a month.
* The number of bars is limited to 12 months.
* In the top right, there is a
* Button with ActionMenu behind it, to select a grouping criteria
* Options: "User", "Subitem"
* Default: "User"
* The shown data:
* User: `TimeEntry.costs` (_time x hourly rate)_
* Subitems: `TimeEntry.costs.group_by(:workspace)`
* The sum per month is shown at the top of each bar
* Depending on the selected scope in the button, the Colors indicate different things:
* "User": each color represents a user. Only the first 5 users are shown, the rest is aggregated and shown as "+X users" in the legend
* "Subitem": one color for (all aggregated) subportfolios, subprograms, and subprojects
* "Cost type": each color represents a cost type
* There is a link at the bottom "View all reports"
* It leads to the Cost reports with filter for the project (and possibly sub projects), and date spend is between the 01.01. and 31.12 of the current year
* The link opens in a new tab to avoid flow interruption
<img class="image_resized op-uc-image op-uc-image_inline" style="width:745px;" src="/api/v3/attachments/793572/content"><img class="image_resized op-uc-image op-uc-image_inline" style="width:759px;" src="/api/v3/attachments/793573/content">
<br>
\-----
Taken from ##66124
* There is a new widget called "**Actual cost per month**". It is a stacked bar chart for monthly actual costs:
* Each bar represents a month.
* The current month as well as the last 11 months before are shown
* The sum per month is shown at the top of each bar
* Colors indicate cost types.
* Labour costs are also shown as an additional cost type (unless it is 0).
* There is a link at the bottom "View actual cost details"
* It leads to the Cost reports with filter for the project (and possibly sub projects), and date spend is at least the month shown in the diagram
* The link opens in a new tab to avoid flow interruption
* Technical note: These are `CostEntry` and `TimeEntry` which share a common interface
* <figure class="image image_resized op-uc-figure" style="width:390px;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/789566/content"></div></figure>
* Depending on the workspace and hierachy, the shown data is different:
* **Case 1: Single project only**
* All widgets display the **summed values of all budgets used within that project**
* **Case 2: Aggregation for portfolios, programs and sub-projects**
* All widgets display the **summed values of all budgets of itself and all visible subitems**
* When aggregating, make sure to not count budgets in the hierarchy twice
* Example:
* Program X: 4€ (aggregated)
\-- own Budget: 2€
\-- Project X.A: 1€
\-- Project X.B: 1€
* Portfolio Y: 6€ (aggregated)
\-- own Budget: 2€
\-- Program Y.C: 1€
\-- Program Y.D: 3€ (aggregated)
-- own Budget: 1€
-- Project Y.D.1: 1€
-- Project Y.D.2: 1€
* There is a short summary written to explain that the budget is aggregated (e.g. "Data aggregated from 16 budgets included in the portfolio, 5 subprograms, and 15 subprojects")
## **Technical notes**
* We stick to the chart libary chart.js
## **Permissions and visibility considerations**
* _We use the existing permissions._
## **Translation considerations**
* _No new terms planned. We use the existing translations strings._
## **Out of scope**
* Changes to the Time & Costs module module.
* New widgets for the Dashboard
* Options to remove sub-reports
* Switch to weeks, days or quarters
**I want to** see the costs and spent time on my Overview page
**so that** I easily get an overview of the financial plan and status.
# **Motivation**
* Understand how much money was spent.
* Understand the costs incurred.
* Make the project overview more useful and engaging.
* Improve onboarding of OpenProject in general
* Reduce churn of OpenProject in general
# **Acceptance criteria**
* There is a new widget for the Time & Costs module shown on the Overview page only
* Widgets shown only if TIme and Costs module is activated in the project.
* When no time has been logged yet, the widget shows a Blankslate with
* icon: op-cost-reports
* header: Start tracking your time and costs
* Description: Get an overview of the current costs to monitor progress of your project.
* (Primary) Button: `Log time` _\-> /my/time-tracking/_
* The new widget is called "**Time and costs**". It is a stacked bar chart for monthly actual costs:
* Each bar represents a month.
* The number of bars is limited to 12 months.
* In the top right, there is a
* Button with ActionMenu behind it, to select a grouping criteria
* Options: "User", "Subitem"
* Default: "User"
* The shown data:
* User: `TimeEntry.costs` (_time x hourly rate)_
* Subitems: `TimeEntry.costs.group_by(:workspace)`
* The sum per month is shown at the top of each bar
* Depending on the selected scope in the button, the Colors indicate different things:
* "User": each color represents a user. Only the first 5 users are shown, the rest is aggregated and shown as "+X users" in the legend
* "Subitem": one color for (all aggregated) subportfolios, subprograms, and subprojects
* "Cost type": each color represents a cost type
* There is a link at the bottom "View all reports"
* It leads to the Cost reports with filter for the project (and possibly sub projects), and date spend is between the 01.01. and 31.12 of the current year
* The link opens in a new tab to avoid flow interruption
<img class="image_resized op-uc-image op-uc-image_inline" style="width:745px;" src="/api/v3/attachments/793572/content"><img class="image_resized op-uc-image op-uc-image_inline" style="width:759px;" src="/api/v3/attachments/793573/content">
<br>
\-----
Taken from ##66124
*
* Each bar represents a month.
* The current month as well as the last 11 months before are shown
* The sum per month is shown at the top of each bar
* Colors indicate cost types.
* Labour costs are also shown as an additional cost type (unless it is 0).
* There is a link at the bottom "View actual cost details"
* It leads to the Cost reports with filter for the project (and possibly sub projects), and date spend is at least the month shown in the diagram
* The link opens in a new tab to avoid flow interruption
* Technical note: These are `CostEntry` and `TimeEntry` which share a common interface
* <figure class="image image_resized op-uc-figure" style="width:390px;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/789566/content"></div></figure>
*
* **Case 1: Single project only**
* All widgets display the **summed values of all budgets used within that project**
* **Case 2: Aggregation for portfolios, programs and sub-projects**
* All widgets display the **summed values of all budgets of itself and all visible subitems**
* When aggregating, make sure to not count budgets in the hierarchy twice
* Example:
* Program X: 4€ (aggregated)
\-- own Budget: 2€
\-- Project X.A: 1€
\-- Project X.B: 1€
* Portfolio Y: 6€ (aggregated)
\-- own Budget: 2€
\-- Program Y.C: 1€
\-- Program Y.D: 3€ (aggregated)
-- own Budget: 1€
-- Project Y.D.1: 1€
-- Project Y.D.2: 1€
* There is a short summary written to explain that the budget is aggregated (e.g. "Data aggregated from 16 budgets included in the portfolio, 5 subprograms, and 15 subprojects")
## **Technical notes**
* We stick to the chart libary chart.js
## **Permissions and visibility considerations**
* _We use the existing permissions._
## **Translation considerations**
* _No new terms planned. We use the existing translations strings._
## **Out of scope**
* Changes to the Time & Costs module module.
* New widgets for the Dashboard
* Options to remove sub-reports
* Switch to weeks, days or quarters