Content
Updated by Christophe Bliard about 1 month ago
# Acceptance criteria
* **% Complete** is always derived from other work package attributes. It is therefore read only.
* When configured to be work-based
* 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 status-based
* 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
* **Total % Complete** value is computed from the Total work and Total 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** 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 work-based
* 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 while remaining work is unset
* 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 14.0), 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 status-based
* 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.
### Side-effects
* [x] **Setting % Complete by sending emails to OpenProject should not be possible anymore**
It's possible to send emails to openproject and [update work package attributes based on email content](https://www.openproject.org/docs/installation-and-operations/configuration/incoming-emails/#work-packages). % Complete can be set this way with `done ratio: 30` in the email body.
This has to be removed as % Complete will be read-only.
And we'll have to make it possible to set Remaining work instead.
References: [source code](https://github.com/opf/openproject/blob/8fa85845385d0fe5edef1cf6de3f7733256a8f3c/app/models/mail_handler.rb#L378-L392), [example email fixture](https://github.com/opf/openproject/blob/0b15db3c9acf2654cc1c83671c2f76d1817d6be4/spec/fixtures/mail_handler/wp_on_given_project.eml), and [spec](https://github.com/opf/openproject/blob/f30a43da7a7bed1c00561364da14a1de9dba223a/spec/models/mail_handler_spec.rb).
* [ ] **Setting status by commit message should not update % Complete anymore**
When using integrated repositories module, it's possible to [mark a work package as fixed through a commit message](https://www.openproject.org/docs/system-admin-guide/system-settings/repositories/#reference-and-fix-work-packages-in-commit-messages). When doing so, a specific status and % Complete value can be set.
Setting % Complete when fixing work package through commit message has to be removed as % Complete will be read-only. Setting the status should be enough.
It could be also a good opportunity to fix ##35369.
References: [source code](https://github.com/opf/openproject/blob/4f57eb683a478afac40e1b3bc40bdf7d718d065e/app/models/changeset.rb#L237-L239)
* [x] **Bulk editing % Complete should not be possible anymore**
When [bulk editing work packages](https://www.openproject.org/docs/user-guide/work-packages/edit-work-package/#bulk-edit-work-packages), it's possible to set % Complete value.
This has to be removed as % Complete will be read-only.
### Migration
As the goal is to have consistent Work, Remaining work and % Complete, migration has to fix any inconsistencies.
* When work-based
* 3 fields are set
* If Remaining work is greater than Work, then Remaining work is discarded and derived from Work and % Complete
* If Remaining work if less than or equal to Work, then % Complete is derived from Work and Remaining work
* 2 fields out of 3 are set
* When Work and Remaining Work are set, and % Complete is unset
* if Remaining work is greater than Work, then Remaining work becomes unset
* If Remaining work if less than or equal to Work, then % Complete is derived from Work and Remaining work
* When Work and % Complete are set, and Remaining work is unset, then Remaining work is derived from Work and % Complete
* When Remaining work and % Complete are set, and Work is unset, then Work is derived from Remaining work and % Complete
* 1 field out of 3 is set, nothing changes
* When only Work is set, % Remaining work and % Complete remain unset
* When only Remaining work is set, Work and % Complete remain unset
* When only % Complete is set, Work and Remaining work remain unset
* When status-based
* % Complete is always updated to the % Complete value of the status
* Then
* If % Complete is set and Work is set, Remaining work is derived from Work and % Complete
* If % Complete is set and Work is unset, Remaining work becomes unset
* If % Complete is unset, Remaining work becomes unset
* When disabled
* "Disabled" option will be removed and migrated to work-based. All % Complete values are considered invalid. We can not use them. There might be manually set values for Work and Remaining Work. Since they are visible they are more correct than any invisible values for % Complete.
* Unset all % Complete values
* Open point: with or without journals?
* Set mode to work-based and apply its logic:
* if Remaining work is greater than Work, unset Remaining work
* Calculate % Complete based on Work and Remaining Work if both are set
* Total values are updated accordingly. The migration does not have an impact on their calculation
If there are changes, they need to appear in a journal entry whose author is the system user. The journal entry will explain why values have changed.
### **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"?
#### Child work package with only work being set
We identified a scenario where the total % complete seems wrong.
It happens with a parent and a child Here are the steps to reproduce it:
* in work-based mode
* Create a parent with W=10h
* \=> RW set to 10h and %C set to 0%
* Create a child with W=5h
* \=> RW set to 5h and %C set to 0%
* \=> on the parent ∑W set to 15h, ∑RW set to 15h, ∑%C set to 0%
* Now, unset RW on the child
* \=> on the child, %C unset
* \=> on the parent, ∑RW set to 10h
* and as ∑W=15, and ∑RW=10, _∑%C is set to 33%_
* in status-based mode
* Status "New" has 0% completion
* Status "On hold" has no completion set
* Create a parent with status "New", and W=10h
* \=> %C set to 0% and so RW set to 10h
* Create a child with status "New", and W=5h
* \=> %C set to 0% and so RW set to 5h
* \=> on the parent ∑W set to 15h, ∑RW set to 15h, ∑%C set to 0%
* Now, set child status to "On hold"
* \=> on the child, %C unset and so RW unset
* \=> on the parent, ∑RW set to 10h
* and as ∑W=15, and ∑RW=10, _∑%C is set to 33%_
_<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/95587/content">_
**The problem**: Having the parent ∑33% feels _wrong_. No work has started and yet, it shows already 33% completion. Yet it's consistent with the computed ∑W and ∑RW on the parent.
This case can also happen as part of migrated data as we decided that if only W is set, or if only RW is set then we keep it as is.
**Possible alternatives**:
* In work-based mode we could forbid to unset RW when W is set
* Does not work in status-based
* We could also decide to allow unsetting RW, but then it unsets W as well
* bad side effect in status-based where we would lose the W value
* We could exclude a work package from totals if not both W and RW are set
* works for both status-based and work-based mode
* Open to discussion for other alternatives.
### Out of Scope
* Integration of the concept of logged time, work done, actual work
* **% Complete** is always derived from other work package attributes. It is therefore read only.
* When configured to be work-based
* 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 status-based
* 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
* **Total % Complete** value is computed from the Total work and Total 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** 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 work-based
* 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 while remaining work is unset
* 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 14.0), 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 status-based
* 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.
### Side-effects
* [x] **Setting % Complete by sending emails to OpenProject should not be possible anymore**
It's possible to send emails to openproject and [update work package attributes based on email content](https://www.openproject.org/docs/installation-and-operations/configuration/incoming-emails/#work-packages). % Complete can be set this way with `done ratio: 30` in the email body.
This has to be removed as % Complete will be read-only.
And we'll have to make it possible to set Remaining work instead.
References: [source code](https://github.com/opf/openproject/blob/8fa85845385d0fe5edef1cf6de3f7733256a8f3c/app/models/mail_handler.rb#L378-L392), [example email fixture](https://github.com/opf/openproject/blob/0b15db3c9acf2654cc1c83671c2f76d1817d6be4/spec/fixtures/mail_handler/wp_on_given_project.eml), and [spec](https://github.com/opf/openproject/blob/f30a43da7a7bed1c00561364da14a1de9dba223a/spec/models/mail_handler_spec.rb).
* [ ] **Setting status by commit message should not update % Complete anymore**
When using integrated repositories module, it's possible to [mark a work package as fixed through a commit message](https://www.openproject.org/docs/system-admin-guide/system-settings/repositories/#reference-and-fix-work-packages-in-commit-messages). When doing so, a specific status and % Complete value can be set.
Setting % Complete when fixing work package through commit message has to be removed as % Complete will be read-only. Setting the status should be enough.
It could be also a good opportunity to fix ##35369.
References: [source code](https://github.com/opf/openproject/blob/4f57eb683a478afac40e1b3bc40bdf7d718d065e/app/models/changeset.rb#L237-L239)
* [x] **Bulk editing % Complete should not be possible anymore**
When [bulk editing work packages](https://www.openproject.org/docs/user-guide/work-packages/edit-work-package/#bulk-edit-work-packages), it's possible to set % Complete value.
This has to be removed as % Complete will be read-only.
### Migration
As the goal is to have consistent Work, Remaining work and % Complete, migration has to fix any inconsistencies.
* When work-based
* 3 fields are set
* If Remaining work is greater than Work, then Remaining work is discarded and derived from Work and % Complete
* If Remaining work if less than or equal to Work, then % Complete is derived from Work and Remaining work
* 2 fields out of 3 are set
* When Work and Remaining Work are set, and % Complete is unset
* if Remaining work is greater than Work, then Remaining work becomes unset
* If Remaining work if less than or equal to Work, then % Complete is derived from Work and Remaining work
* When Work and % Complete are set, and Remaining work is unset, then Remaining work is derived from Work and % Complete
* When Remaining work and % Complete are set, and Work is unset, then Work is derived from Remaining work and % Complete
* 1 field out of 3 is set, nothing changes
* When only Work is set, % Remaining work and % Complete remain unset
* When only Remaining work is set, Work and % Complete remain unset
* When only % Complete is set, Work and Remaining work remain unset
* When status-based
* % Complete is always updated to the % Complete value of the status
* Then
* If % Complete is set and Work is set, Remaining work is derived from Work and % Complete
* If % Complete is set and Work is unset, Remaining work becomes unset
* If % Complete is unset, Remaining work becomes unset
* When disabled
* "Disabled" option will be removed and migrated to work-based. All % Complete values are considered invalid. We can not use them. There might be manually set values for Work and Remaining Work. Since they are visible they are more correct than any invisible values for % Complete.
* Unset all % Complete values
* Open point: with or without journals?
* Set mode to work-based and apply its logic:
* if Remaining work is greater than Work, unset Remaining work
* Calculate % Complete based on Work and Remaining Work if both are set
* Total values are updated accordingly. The migration does not have an impact on their calculation
If there are changes, they need to appear in a journal entry whose author is the system user. The journal entry will explain why values have changed.
### **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"?
#### Child work package with only work being set
We identified a scenario where the total % complete seems wrong.
It happens with a parent and a child Here are the steps to reproduce it:
* in work-based mode
* Create a parent with W=10h
* \=> RW set to 10h and %C set to 0%
* Create a child with W=5h
* \=> RW set to 5h and %C set to 0%
* \=> on the parent ∑W set to 15h, ∑RW set to 15h, ∑%C set to 0%
* Now, unset RW on the child
* \=> on the child, %C unset
* \=> on the parent, ∑RW set to 10h
* and as ∑W=15, and ∑RW=10, _∑%C is set to 33%_
* in status-based mode
* Status "New" has 0% completion
* Status "On hold" has no completion set
* Create a parent with status "New", and W=10h
* \=> %C set to 0% and so RW set to 10h
* Create a child with status "New", and W=5h
* \=> %C set to 0% and so RW set to 5h
* \=> on the parent ∑W set to 15h, ∑RW set to 15h, ∑%C set to 0%
* Now, set child status to "On hold"
* \=> on the child, %C unset and so RW unset
* \=> on the parent, ∑RW set to 10h
* and as ∑W=15, and ∑RW=10, _∑%C is set to 33%_
_<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/95587/content">_
**The problem**: Having the parent ∑33% feels _wrong_. No work has started and yet, it shows already 33% completion. Yet it's consistent with the computed ∑W and ∑RW on the parent.
This case can also happen as part of migrated data as we decided that if only W is set, or if only RW is set then we keep it as is.
**Possible alternatives**:
* In work-based mode we could forbid to unset RW when W is set
* Does not work in status-based
* We could also decide to allow unsetting RW, but then it unsets W as well
* bad side effect in status-based where we would lose the W value
* We could exclude a work package from totals if not both W and RW are set
* works for both status-based and work-based mode
* Open to discussion for other alternatives.
### Out of Scope
* Integration of the concept of logged time, work done, actual work