Content
View differences
Updated by Parimal Satyal about 2 years ago
Part of ##40867
Motivation is to be able to record work with different units.
GitLab for instance is using their [gitlab\_chronic\_duration](https://gitlab.com/gitlab-org/ruby/gems/gitlab-chronic-duration) gem to render duration as "2 wks 1 day 1 hr" for instance. See also [this file](https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/lib/gitlab/time_tracking_formatter_spec.rb) for more examples.
See below for subtasks
### Acceptance criteria
* **Allow users to input in the values for Work and Remaining work in different units**
* Based on [gitlab\_chronic\_duration](https://gitlab.com/gitlab-org/ruby/gems/gitlab-chronic-duration)
* Modal needs to give instant feedback of conversions so users are aware of how their input will be converted
* **Display in mixed units (GitLab-style) everywhere**
* Work package tables (including totals and sums)
* Work estimates and progress popover
* Work package details page
* Activity (journal updates)
* **Admin settings to define:**
* Change title from "Working days" to "Working days and hours"
* Add three sections:
* Hours per day:
* Input field, default value: 8 hours
* Days per week:
* Input field, default value: 5 days 40 hours
* Days per month:
* Input field, default value: 20 days
* **Language:** Different units will only be supported in English
* _known potential inconsistency: date picker uses translated units for days for display_
#### Out of scope
* View query (question of scales, cut-off smaller units, same unit for the entire query)
* The ability to either:
* disable this display option or
* choose between existing mode (hours-only) and different units mode
* ~~Info icons that let users get the original value in hours on hover~~
* Project-level definition of days, weeks and months
* User-level definition of days, weeks and months
####
#### Visuals
**Current:**
**<img class="image_resized op-uc-image op-uc-image_inline" style="width:449px;" src="/api/v3/attachments/101238/content">**
**After:**
<img class="image_resized op-uc-image op-uc-image_inline" style="width:444px;" src="/api/v3/attachments/101239/content">
**Admin options:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/101553/content">**
#### Figma:
[https://www.figma.com/file/znrocQvFNLb5jXRXNo7oeD/Progress-estimation?type=design&node-id=1823-5375&mode=design](https://www.figma.com/file/znrocQvFNLb5jXRXNo7oeD/Progress-estimation?type=design&node-id=1823-5375&mode=design)
#### Anticipated UX issues (to be reviewed)
* **Difficult to scan and compare values:** Having everything displayed in the same unit makes it easier to scan and quickly compare values (to get a sense of scale). For example, compare the following set of values:
* Current display mode:
* 5h and 15h
* 18h and 56h
* 40h and 122h
* New display mode:
* 5h and 1d 7h
* 2d 2h and 1w 2d
* 1w and 3w 2h
* **Lack of user choice:** Users who are used to using hours might be disappointed or confused to find that they don't have a choice to continue seeing Work and Remaining work displayed in hours.
* **Wider cells required in tables:** In work package tables, we currently display Work and Remaing work in hours, so the width required for these cells is limited. With different units, these cells will have to be wider:
* Current lengths:
* Basic: "188 h"
* Sums: "188 h • Σ 269h"
* With changes:
* Basic: "3w 3d 4h"
* Sums: "3w 3d 4h • Σ 6w 3d 5h"
* **Lack of clarity on original values:** Without a _translation_ in hours (on hover, for example), users might have trouble getting a sense of the "actual" recorded value. Especially for users who might work in different regions where the work week or work day isn't the same as in Germany.
* Because the definition of these units is in at the instance admin level, regular users will simply not have access to the base values.
* ~~V1: Multi-unit input with fixed values~~
* ~~Can input W or RW in minutes, hours, days, week or month~~
* ~~Automatically gets converted to hours on save~~
* ~~V2: Custom values for hours per day, hours/days per week, days per month~~
* ~~V3: Hybrid units (display of entered data into the automatically "correct" scale, 42 hours = 1 week, 2 hours).~~
* ~~V4: Setting per query that lets you pick the unit (one unit, the same for all cells: hours, days, weeks, months)~~
Motivation is to be able to record work with different units.
GitLab for instance is using their [gitlab\_chronic\_duration](https://gitlab.com/gitlab-org/ruby/gems/gitlab-chronic-duration) gem to render duration as "2 wks 1 day 1 hr" for instance. See also [this file](https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/lib/gitlab/time_tracking_formatter_spec.rb) for more examples.
See below for subtasks
### Acceptance criteria
* **Allow users to input in the values for Work and Remaining work in different units**
* Based on [gitlab\_chronic\_duration](https://gitlab.com/gitlab-org/ruby/gems/gitlab-chronic-duration)
* Modal needs to give instant feedback of conversions so users are aware of how their input will be converted
* **Display in mixed units (GitLab-style) everywhere**
* Work package tables (including totals and sums)
* Work estimates and progress popover
* Work package details page
* Activity (journal updates)
* **Admin settings to define:**
* Change title from "Working days" to "Working days and hours"
* Add three sections:
* Hours per day:
* Input field, default value: 8 hours
* Days per week:
* Input field, default value: 5 days
* Days per month:
* Input field, default value: 20 days
* **Language:** Different units will only be supported in English
* _known potential inconsistency: date picker uses translated units for days for display_
* View query (question of scales, cut-off smaller units, same unit for the entire query)
* The ability to either:
* disable this display option or
* choose between existing mode (hours-only) and different units mode
* ~~Info icons that let users get the original value in hours on hover~~
* Project-level definition of days, weeks and months
* User-level definition of days, weeks and months
####
#### Visuals
**Current:**
**<img class="image_resized op-uc-image op-uc-image_inline" style="width:449px;" src="/api/v3/attachments/101238/content">**
**After:**
<img class="image_resized op-uc-image op-uc-image_inline" style="width:444px;" src="/api/v3/attachments/101239/content">
**Admin options:**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/101553/content">**
#### Figma:
[https://www.figma.com/file/znrocQvFNLb5jXRXNo7oeD/Progress-estimation?type=design&node-id=1823-5375&mode=design](https://www.figma.com/file/znrocQvFNLb5jXRXNo7oeD/Progress-estimation?type=design&node-id=1823-5375&mode=design)
#### Anticipated UX issues (to be reviewed)
* **Difficult to scan and compare values:** Having everything displayed in the same unit makes it easier to scan and quickly compare values (to get a sense of scale). For example, compare the following set of values:
* Current display mode:
* 5h and 15h
* 18h and 56h
* 40h and 122h
* New display mode:
* 5h and 1d 7h
* 2d 2h and 1w 2d
* 1w and 3w 2h
* **Lack of user choice:** Users who are used to using hours might be disappointed or confused to find that they don't have a choice to continue seeing Work and Remaining work displayed in hours.
* **Wider cells required in tables:** In work package tables, we currently display Work and Remaing work in hours, so the width required for these cells is limited. With different units, these cells will have to be wider:
* Current lengths:
* Basic: "188 h"
* Sums: "188 h • Σ 269h"
* With changes:
* Basic: "3w 3d 4h"
* Sums: "3w 3d 4h • Σ 6w 3d 5h"
* **Lack of clarity on original values:** Without a _translation_ in hours (on hover, for example), users might have trouble getting a sense of the "actual" recorded value. Especially for users who might work in different regions where the work week or work day isn't the same as in Germany.
* Because the definition of these units is in at the instance admin level, regular users will simply not have access to the base values.
* ~~Can input W or RW in minutes, hours, days, week or month~~
* ~~Automatically gets converted to hours on save~~
* ~~V2: Custom values for hours per day, hours/days per week, days per month~~
* ~~V3: Hybrid units (display of entered data into the automatically "correct" scale, 42 hours = 1 week, 2 hours).~~
* ~~V4: Setting per query that lets you pick the unit (one unit, the same for all cells: hours, days, weeks, months)~~