Content
View differences
Updated by Parimal Satyal over 2 years ago
# Acceptance criteria
* **% Complete** is always derived calculated from other the work package attributes. field. It is therefore read only.
* When configured to be calculated from the work package fields
* It is computed from Work and Remaining work. For instance Work = 10h, Remaining work = 3h => % Complete = 70%
* If Work or Remaining work is unset, % Complete is unset. The only exception is for migration (see below).
* When configured to be calculated from status
* Each work package status is associated with a % Complete value
* Setting the work package to a status sets the % Complete value of the work package
* If Work is set, it also sets the Remaining work of the work package
* Changing Work updates the Remaining work
* Unsetting Work unsets the Remaining work, it does not change the % Complete
* **Derived % Complete** value is computed from the Derived work and Derived remaining work values of the work package
* This ensures all values are consistent, regardless of using status or fields for % Complete calculation
* Work packages with Work = 0 h or unset are thus excluded
* "Rejected" children will be excluded from the calculation once #49409 is done.
* A **popover** **modal** opens when clicking on one of the attributes (Work, Remaining work, % Complete).
* If possible, the attribute clicked becomes the active field in the modal, if not possible, the first field becomes active.
* When configured to be calculated from the work package fields
* The modal has 3 fields: Work, Remaining work, and % Complete
* % Complete field is always disabled
* % Remaining work field is disabled if Work is unset
* Work field is active by default when it is not set
* When Work is set
* if % Complete is unset, Remaining work field is enabled and set to the same value as Work and % Complete is set to 0%
* if % Complete is set (value was set before upgrading to 13.3), Remaining work field is enabled and _set according to % Complete and Work_.
* When Remaining work is changed, % Complete is updated according to Work and Remaining work.
* Remaining work can't exceed Work
* When Work is changed, Remaining work is changed by the same amount and % Complete is updated according to Work and Remaining work.
* Unsetting the field Work unsets both % Complete and Remaining work, and disables Remaining work field.
* When configured to be calculated from status
* The modal has 3 fields: Status (xx%) drop-down, Work, and Remaining work
* Remaining work is always disabled
* The Status (xx%) dropdown is showing both the status of the work package and its associated % Complete.
* Selecting another value from the Status (xx%) dropdown updates the status and % Complete. If Work is set, Remaining work is updated according to Work and % Complete
* When work is unset, Remaining work becomes unset
* The statuses displayed in the dropdown depend on the user's workflow restrictions
* There can only be one popover open at a time.
* If a different related field is clicked on for the same work package (Work when Remaining work triggered the popover), the current popover remains open (is not dismissed).
* If the field that is clicked _is_ available (editable), the focus shifts to that field.
* If a related field is clicked on for a _different_ work package, the previous popover is dismissed (changes not saved) and a new one opened next to the field that is clicked on.
* If an entirely different field is clicked on, the popover is dismissed without the changes being saved.
* When creating a new work package Work is unset.
### **Figma link:**
[https://www.figma.com/file/znrocQvFNLb5jXRXNo7oeD/Progress-estimation?type=design&node-id=1200-10894&mode=design](https://www.figma.com/file/znrocQvFNLb5jXRXNo7oeD/Progress-estimation?type=design&node-id=1200-10894&mode=design)
### Reference
**Current (wrong) calculation 13.2**
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/88713/content"></div><figcaption class="op-uc-figure--description">https://niels.openproject-edge.com/projects/progress-calculation-1/work_packages?query_id=338</figcaption></figure>
**Correct calculation**
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/88712/content"></div><figcaption class="op-uc-figure--description">https://community.openproject.org/api/v3/file_links/1269/open</figcaption></figure>
###
### Scenarios
**Considerations**
* The teams are regularly asked two questions
1. Spent time: How much time did you spent on a task?
2. Remaining work: How much time do you think you will need to finish the task?
<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><thead class="op-uc-table--head"><tr class="op-uc-table--row"><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p"><br data-cke-filler="true"></p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Work</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Remaining work</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Work done</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">% Complete (read only)</p></th></tr></thead><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(1) Update according to plan</strong></p></td><td class="op-uc-table--cell" colspan="4"><p class="op-uc-p">The resources worked on the task. This increases Work done. Remaining is reduced accordingly.</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Initial</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>33.3%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Input value</p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><strong>5h (-5h)</strong></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Result</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>5h</i></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>10h</i></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>66.7%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(2) Worse than planned</strong></p></td><td class="op-uc-table--cell" colspan="4"><p class="op-uc-p">The estimated work to finish the task is higher than expected.</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Initial</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>33.3%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Input value</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><strong>20h (+5 h)</strong></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Result</p></td><td class="op-uc-table--cell"><p class="op-uc-p">20h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>10h</i></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>25%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(3) Better than planned</strong></p></td><td class="op-uc-table--cell" colspan="4"><p class="op-uc-p">No work done: The teams estimate less Remaining work due to new information or changed scope.</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Initial</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>33.3%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Input value</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><strong>10 h (-5h)</strong></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Result</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">50%</p></td></tr></tbody></table></figure>
### Open
* Do we need something like "Actual work"? And if yes, what is the difference to "Spent time"?
### Out of Scope
* Integration of the concept of logged time, work done, actual work
* **% Complete** is always derived
* When configured to be calculated from the work package fields
* It is computed from Work and Remaining work. For instance Work = 10h, Remaining work = 3h => % Complete = 70%
* If Work or Remaining work is unset, % Complete is unset. The only exception is for migration (see below).
* When configured to be calculated from status
* Each work package status is associated with a % Complete value
* Setting the work package to a status sets the % Complete value of the work package
* If Work is set, it also sets the Remaining work of the work package
* Changing Work updates the Remaining work
* Unsetting Work unsets the Remaining work, it does not change the % Complete
* **Derived % Complete** value is computed from the Derived work and Derived remaining work values of the work package
* This ensures all values are consistent, regardless of using status or fields for % Complete calculation
* Work packages with Work = 0 h or unset are thus excluded
* "Rejected" children will be excluded from the calculation once #49409 is done.
* A **popover**
* If possible, the attribute clicked becomes the active field in the modal, if not possible, the first field becomes active.
* When configured to be calculated from the work package fields
* The modal has 3 fields: Work, Remaining work, and % Complete
* % Complete field is always disabled
* % Remaining work field is disabled if Work is unset
* Work field is active by default when it is not set
* When Work is set
* if % Complete is unset, Remaining work field is enabled and set to the same value as Work and % Complete is set to 0%
* if % Complete is set (value was set before upgrading to 13.3), Remaining work field is enabled and _set according to % Complete and Work_.
* When Remaining work is changed, % Complete is updated according to Work and Remaining work.
* Remaining work can't exceed Work
* When Work is changed, Remaining work is changed by the same amount and % Complete is updated according to Work and Remaining work.
* Unsetting the field Work unsets both % Complete and Remaining work, and disables Remaining work field.
* When configured to be calculated from status
* The modal has 3 fields: Status (xx%) drop-down, Work, and Remaining work
* Remaining work is always disabled
* The Status (xx%) dropdown is showing both the status of the work package and its associated % Complete.
* Selecting another value from the Status (xx%) dropdown updates the status and % Complete. If Work is set, Remaining work is updated according to Work and % Complete
* When work is unset, Remaining work becomes unset
* The statuses displayed in the dropdown depend on the user's workflow restrictions
* There can only be one popover open at a time.
* If a different related field is clicked on for the same work package (Work when Remaining work triggered the popover), the current popover remains open (is not dismissed).
* If the field that is clicked _is_ available (editable), the focus shifts to that field.
* If a related field is clicked on for a _different_ work package, the previous popover is dismissed (changes not saved) and a new one opened next to the field that is clicked on.
* If an entirely different field is clicked on, the popover is dismissed without the changes being saved.
* When creating a new work package Work is unset.
### **Figma link:**
[https://www.figma.com/file/znrocQvFNLb5jXRXNo7oeD/Progress-estimation?type=design&node-id=1200-10894&mode=design](https://www.figma.com/file/znrocQvFNLb5jXRXNo7oeD/Progress-estimation?type=design&node-id=1200-10894&mode=design)
### Reference
**Current (wrong) calculation 13.2**
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/88713/content"></div><figcaption class="op-uc-figure--description">https://niels.openproject-edge.com/projects/progress-calculation-1/work_packages?query_id=338</figcaption></figure>
**Correct calculation**
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/88712/content"></div><figcaption class="op-uc-figure--description">https://community.openproject.org/api/v3/file_links/1269/open</figcaption></figure>
###
### Scenarios
**Considerations**
* The teams are regularly asked two questions
1. Spent time: How much time did you spent on a task?
2. Remaining work: How much time do you think you will need to finish the task?
<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><thead class="op-uc-table--head"><tr class="op-uc-table--row"><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p"><br data-cke-filler="true"></p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Work</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Remaining work</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Work done</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">% Complete (read only)</p></th></tr></thead><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(1) Update according to plan</strong></p></td><td class="op-uc-table--cell" colspan="4"><p class="op-uc-p">The resources worked on the task. This increases Work done. Remaining is reduced accordingly.</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Initial</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>33.3%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Input value</p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><strong>5h (-5h)</strong></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Result</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>5h</i></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>10h</i></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>66.7%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(2) Worse than planned</strong></p></td><td class="op-uc-table--cell" colspan="4"><p class="op-uc-p">The estimated work to finish the task is higher than expected.</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Initial</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>33.3%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Input value</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><strong>20h (+5 h)</strong></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Result</p></td><td class="op-uc-table--cell"><p class="op-uc-p">20h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>10h</i></p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>25%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(3) Better than planned</strong></p></td><td class="op-uc-table--cell" colspan="4"><p class="op-uc-p">No work done: The teams estimate less Remaining work due to new information or changed scope.</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Initial</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><i>33.3%</i></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Input value</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><strong>10 h (-5h)</strong></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td><td class="op-uc-table--cell"><p class="op-uc-p"></p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Result</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">5h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">50%</p></td></tr></tbody></table></figure>
### Open
* Do we need something like "Actual work"? And if yes, what is the difference to "Spent time"?
### Out of Scope
* Integration of the concept of logged time, work done, actual work