Ability to update an issue's estimate by specifying the time _remaining_ (rather than total time)
Currently, the /estimate
quick action lets you overwrite the issue/MR's previous estimate. But in practice, users often revise the estimate after some work has already been completed, which requires the user to look up the time already spent, and add to that the estimated time remaining. We could simplify that process by adding a way to specify just the estimated time remaining.
Quoting @jvmatl from #335028 (comment 627911812):
I think, as a developer, it's much more useful to be able to say "I think there are about 4 hours of work left to do on this, so please update the time estimate to equal the current work spent (whatever it is) plus 4 more hours"
Proposal
We currently have this quick action:
/estimate 4h # sets the total estimate to 4 hours
We could add a variation, where the +
signifies that the specified time is relative to the time already spent:
/estimate +4h # sets the total estimate to the amount of time already spent on the issue plus 4 hours
and/or a new quick action:
/remaining_estimate 4h # sets the total estimate to the amount of time already spent on the issue plus 4 hours
Detailed Use Case
# When I create an issue with an estimate in the description:
/estimate 8h
# Then the sidebar should show "Spent 0h, Est 8h"
# And the sidebar tooltip should show "Time remaining: 8h"
# When I work on the issue and log the time with a comment:
/spend 6h
# Then the sidebar should show "Spent 6h, Est 8h"
# And the sidebar tooltip should show "Time remaining: 2h"
# Then I reassess and realize it will take another 6 hours.
# With the current version of GitLab,
# I can look at the sidebar and see that 6 hours have been spent,
# and mentally add that to my new 6-hours-remaining estimate,
# and leave a comment to replace the old estimate with a new one:
/estimate 12h
# Then the sidebar should show "Spent 6h, Est 12h"
# And the sidebar tooltip should show "Time remaining: 6h"
# Alternatively/equivalently, with the proposed new syntax, I could simply comment:
/estimate +6h
# …which would take the 6h already spent on the issue,
# add the 6h in the quick-action argument,
# and set the issue's estimate to 12h.
# Then the sidebar should show "Spent 6h, Est 12h"
# And the sidebar tooltip should show "Time remaining: 6h"
/cc @leetickett