•  
      story #14828 display dates with both absolute and relative dates
    Summary
    Empty
    display dates with both absolute and relative dates

    For all quality / process documentation related we must comply to IS0 9001.
    We have defined that all documentation should be updated every 4 years. But information "4 years ago" doesn't say if its january or december.
    Many users don't have the information and are tool familiar to guess that the date is available if the mouse stay in the information 5 years ago.

    Overview

    The targeted rendering can be see on codepen.

    It comes with a new user preference where one can choose:

    • Absolute date (relative is in the :hover)
    • Relative date (absolute is in the :hover)
    • Absolute first (relative is in small on top or next when inline)
    • Relative first (absolute is in small on top or next when inline)

    In this first step, this new user preference is used where relative dates are used:

    • In Tracker (artifact views, modal, table renders, card fields, tooltip cross references)
    • In Agile Dashboard
      • Planning modal only (cardwall and homepage modal is excluded)
    • In Document
    • In legacy docman

    The site administrator has a way to define what is the platform default as well as reset all user preferences.

    Pitfalls and limitations

    As of today, it's not clear if this preference should be applied to all display of dates like:

    1962-image-20200423163731-1.png

    1963-image-20200423163748-2.png

    1964-image-20200423163801-3.png

    Empty
    Status
    Empty
    Done
    Development
    • [ ] Does it involves User Interface? 
    • [ ] Are there any mockups?
    • [ ] Are permissions checked?
    • [ ] Does it need Javascript development?
    • [ ] Does it need a forge upgrade bucket?
    • [ ] Does it need to execute things in system events?
    • [ ] Does it impact project creation (templates)?
    • [ ] Is it exploratory?
    Empty
    Details
    #14828
    Manuel Vacelet (vaceletm)
    2020-08-13 11:38
    2020-04-23 14:51
    3931

    References
    Referencing story #14828

    Git commit

    tuleap/tuleap/stable

    [refactoring] UserPreferencesDao now uses \Tuleap\DB\DataAccessObject fecf02158d
    Relative dates with custom element d330bd7472
    Remove legacy method html_time_ago() 80bfc8cf40
    Display relative date according to user preference 4ce7fdd62f
    Do not rely on current time in tests 8c366b651b
    Remove unused method getDateSubmittedOn() d32df093c0
    Use tlp-relative-date for follow-up edition 85929cd613
    DRY relative-dates assets inclusion 355fa3f05c
    Decrease timeAgoInWords usage (remaining tracker_artifact part) 4a4227bbd2
    Optimize relative-dates[-polyfills].js import in dashboards dcbe7fe4cc
    Add missing tests 8b490884f2
    Incorrect webpack configuration for tlp 4e227dc23d
    Display dates in trackers stats tooltips 861f3d1ab5
    Use tlp-relative-date in legacy docman 5897ccc33a
    Decrease the usage of timeAgoInWords (gerrit part) d811851f0e
    Decrease the usage of timeAgoInWords (pending document part) 62227980c5
    Decrease legacy timeAgoInWords usage (User details) 9cb4b93668
    Site admin can force the usage of the selected relative dates display 10b3674854
    Site admin can set the default relative dates display preference fa0aacffba
    Display relative dates in tracker artifacts tooltips 28f96ff60c
    Display dates in trackers stats tooltips db8ef4e774
    User can change relative dates display preference c367b67102
    Use tlp-relative-date in angular-artifact-modal 62881960f8
    Use tlp-relative-date in Folder content b6e0884243
    Use tlp-relative-date in QuickLook 3bc0a669ab
    Decrease timeAgoInWordsUsage cf042977a3
    Change the labels of the relative dates display options eb300f3e68
    Have a preview of the selected username and relative dates formats 861d265272
    Take into account UXD feedback on site-admin 23547dd4eb

    Follow-ups

    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    User avatar
    • So that
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes