Content
View differences
Updated by Niels Lindenthal over 2 years ago
# Acceptance criteria
* Status can not be connected with a % Complete value (deprecated in #52130)
* "Rejected" children are excluded from the calcuation (#49409)
* When Work is set, Remaining work and % Complete are consistent (meaning (100% - % Complete) x Work == Remaining Work is _always_ true)
* When calculating the % Complete aggregated value, any work package having Work unset or 0h is excluded from the computation.
* If there is no Work entered it is not possible to enter a % Complete
* Consideration: An unfinished work package (< 100 %) has remaining work by definition. Otherwise it would be 100 %. There can only be a value for Remaining work if there is Work defined (Work >= Remaining work).
* Remaining work and % Complete can only be entered for a work package that has Work defined
* When creating a new work package work is 0 h \[**open:** unset?\]
* When clicking on on of the attributes (Work, Remaining work, % complete) the modal opens
* In the modal the fields Remaining work and % Complete are deactivated. The field Work is active (not mandatory).
* After entering a value to Work, the Remaining work is derived.
* Example: Work 10 h, Remaining work 10 h, % Complete 0%)
* Example: Work 10 h, Remaining work 5 h, % Complete 50%)
* Deleting the field Work deletes % Complete and Remaining Work
**Current (wrong) calcuation 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>
###
### Open Questions
* **Migration**: Described in ##52130
* **Closed status:** What happens when a work package is closed? Does % complete go to 100%?
* NL: No, changing a status does not change the % Complete and the other way round. This has to be done manually or by a custom action button. The reason is that changing % Complete to 100 % can not close the work package.
* **Work by default,** should work be 0h or unset for new work packages or work packages where "work" was not previously input?
* NL: for new work packages the field work is unset.
#### Automatic change of Work:
Does it ever really make sense for Work to be changed by the other two values?
* Example 3:
* Initial state: W = 0h, RW = 0h, % = 0%
* Action: Change W to 15h
* Result 1: W = 15h, RW = 15h (automatically set) % = 0% (automatically set)
### Calculation method
<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">% Complete</p></th></tr></thead><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(1) Adding Work</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">Intial</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">50%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Change</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h (+5h)</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">15 h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h (+5)</p></td><td class="op-uc-table--cell"><p class="op-uc-p">33.33%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(2) Adding Remaining work</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">Initial</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">50%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Change</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">10 h (+5h)</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">10 h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">33.33%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(3) Adding % Complete</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">Initial</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">50%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Change</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">100 % (+ 50 pp)</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">0h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">100%</p></td></tr></tbody></table></figure>
### Open
**Base values:** If all three values are interlinked, which of the values should other values pivot around? Which is the "main" value that should not change?
* For example, if work is increased, which one should remain unchanged?
* Remaining work
* % complete
* Work done (which is not visible)
* NL: The % Complete is always calculated. The only way to change this is by changing input parameters Work and Remaining work.
### Out of Scope
* Integration of the concept of logged time, work done, actual work
* Status can not be connected with a % Complete value (deprecated in #52130)
* "Rejected" children are excluded from the calcuation (#49409)
* When Work is set, Remaining work and % Complete are consistent (meaning (100% - % Complete) x Work == Remaining Work is _always_ true)
* When calculating the % Complete aggregated value, any work package having Work unset or 0h is excluded from the computation.
* If there is no Work entered it is not possible to enter a % Complete
* Consideration: An unfinished work package (< 100 %) has remaining work by definition. Otherwise it would be 100 %. There can only be a value for Remaining work if there is Work defined (Work >= Remaining work).
* Remaining work and % Complete can only be entered for a work package that has Work defined
* When creating a new work package work is 0 h \[**open:** unset?\]
* When clicking on on of the attributes (Work, Remaining work, % complete) the modal opens
* In the modal the fields Remaining work and % Complete are deactivated. The field Work is active (not mandatory).
* After entering a value to Work, the Remaining work is derived.
* Example: Work 10 h, Remaining work 10 h, % Complete 0%)
* Example: Work 10 h, Remaining work 5 h, % Complete 50%)
* Deleting the field Work deletes % Complete and Remaining Work
**Current (wrong) calcuation 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>
###
### Open Questions
* **Migration**: Described in ##52130
* **Closed status:** What happens when a work package is closed? Does % complete go to 100%?
* NL: No, changing a status does not change the % Complete and the other way round. This has to be done manually or by a custom action button. The reason is that changing % Complete to 100 % can not close the work package.
* **Work by default,** should work be 0h or unset for new work packages or work packages where "work" was not previously input?
* NL: for new work packages the field work is unset.
#### Automatic change of Work:
Does it ever really make sense for Work to be changed by the other two values?
* Initial state: W = 0h, RW = 0h, % = 0%
* Action: Change W to 15h
* Result 1: W = 15h, RW = 15h (automatically set) % = 0% (automatically set)
### Calculation method
<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">% Complete</p></th></tr></thead><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(1) Adding Work</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">Intial</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">50%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Change</p></td><td class="op-uc-table--cell"><p class="op-uc-p">15h (+5h)</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">15 h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">10h (+5)</p></td><td class="op-uc-table--cell"><p class="op-uc-p">33.33%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(2) Adding Remaining work</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">Initial</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">50%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Change</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">10 h (+5h)</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">10 h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">33.33%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><strong>(3) Adding % Complete</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">Initial</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">50%</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Change</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">100 % (+ 50 pp)</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">0h</p></td><td class="op-uc-table--cell"><p class="op-uc-p">100%</p></td></tr></tbody></table></figure>
### Open
**Base values:** If all three values are interlinked, which of the values should other values pivot around? Which is the "main" value that should not change?
* For example, if work is increased, which one should remain unchanged?
* Remaining work
* % complete
* Work done (which is not visible)
* NL: The % Complete is always calculated. The only way to change this is by changing input parameters Work and Remaining work.
### Out of Scope
* Integration of the concept of logged time, work done, actual work