Defect #41021
openUnexpected behavior when switching to a status with no %-done value
0%
Description
Suppose having this setting for issue status:
A user having the an issue to status `In progress` will the %-done value as expected:
Switching, however, to a status having not %-done value assigned at all behaves unexpected:
Files
Updated by Liane Hampe 5 months ago
Thank you Go MAEDA for paying attention to this issue.
This is what I expect when changing the status forth and back according to a workflow which allows this flexibility:
Assigning no "%-done" value to a status I do understand to be equal to zero and not to preserve the "%-done" value accompanied with the previous status.
Reason:
On a ticket the user will see 0% if the issue is new assuming the settings above. The UI does not differentiate in having a "%-done" value predefined in admin area or not in this case. The difference between assigning 0% and assigning nothing will only be visible when a user changes back from a status with "%-done" greater 0 to a status with unset "%-done" value since nothing will change. So it feels unexpected to me.
Do you think there is a real use case where this behavior would make sense? I am always open for discussion.
Updated by Holger Just 5 months ago
I actually don't think that assuming "0% done" rather than not setting a value for statuses with no value set is a better solution. I think that his would lead to more data inconsistencies along the way. I believe that the current default is sensible and in line with a lot of other settings in Redmine. Also, explicitly setting 0% for all statuses can be done by the admin. Preserving the current value would then not be possible.
With that being said, setting the "% done" value based on the status and then not defining a value for all status is likely an oversight by the admin (on the border of undefined behavior). Thus, it may be a good idea instead to show an appropriate warning message in the status config list (and possibly also below the "calculate issue done ratio with" setting) if there are any statuses which do not have a %done value defined if the setting is set to use the issue status. Then, I'd be in favor of keeping the current behavior of not setting a new %done value of none is defined for the status.
Updated by Go MAEDA 5 months ago
I share the same opinion as Holger Just. When subtasks exist, if the "% done" value is not set for a status, the parent issue's "% done" is calculated based on the "% done" values and estimated hours of the subtasks. I think that some Redmine users effectively utilize this behavior.
If we change the behavior to set the value to 0% when the "% done" for the status is blank, it will be a breaking change for those who rely on this current behavior.