Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65135

Messaging: date headings within a conversation should include the year, if not the current year

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7
    • Fix Version/s: 3.11
    • Component/s: Messages
    • Labels:
    • Testing Instructions:
      Hide

      Note: testing required database access to update message dates

      1. Login as any user
      2. Open messaging drawer
      3. Click on your self conversation under Starred
      4. Send two messages: "Message one" and then "Message two"
      5. Confirm short date is shown, e.g. 18 December
      6. In your database editor, you should now have two records with the following query:

        SELECT * FROM moodle.m_messages;

      7. Backdate the time of the first message using the following query:

        UPDATE m_messages SET timecreated = 1559913000 WHERE id = 1;

      8. Reload Moodle in your browser
      9. Open messaging drawer
      10. Click on your self conversation under Starred
      11. Confirm the date portion of the first message is "7 June 2019" (e.g. full date)
      12. Confirm the date portion of the second message is "18 December" (e.g. short date)
      Show
      Note: testing required database access to update message dates Login as any user Open messaging drawer Click on your self conversation under Starred Send two messages: "Message one" and then "Message two" Confirm short date is shown, e.g. 18 December In your database editor, you should now have two records with the following query: SELECT * FROM moodle.m_messages; Backdate the time of the first message using the following query: UPDATE m_messages SET timecreated = 1559913000 WHERE id = 1; Reload Moodle in your browser Open messaging drawer Click on your self conversation under Starred Confirm the date portion of the first message is "7 June 2019" (e.g. full date) Confirm the date portion of the second message is "18 December" (e.g. short date)
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Pull 3.11 Branch:
      MDL-65135-311
    • Pull Master Branch:

      Description

      See the attached screenshot. If the message listed under the heading "21 March" was sent last year, how would we know? 

      We should see if it's possible to format these timestamps conditionally, as we did for the recent message dates in MDL-65114

      So (for headings only!):

      • Timestamps for a date which is NOT inside the current calendar year will be of the format "21 March, 2018".
      • Timestamps which are inside the current calendar year remain as they are now.

        Attachments

        1. date_headings_conversation_view.png
          date_headings_conversation_view.png
          13 kB
        2. screenshot-1.png
          screenshot-1.png
          32 kB
        3. MDL-65135 before after.png
          MDL-65135 before after.png
          54 kB
        4. MDL-65135.jpg
          MDL-65135.jpg
          28 kB

          Activity

            People

            Assignee:
            pholden Paul Holden
            Reporter:
            jaked Jake Dallimore
            Peer reviewer:
            David Mudrák (@mudrd8mz)
            Integrator:
            Víctor Déniz Falcón
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            4 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              10/May/21

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 45 minutes
                2h 45m