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

Unnecessary DB call when rendering message drawer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 3.6.3
    • Component/s: Messages
    • Labels:
    • Testing Instructions:
      Hide
      Prerequisite.
      1. A site with three users.
      2. The setting 'Allow site-wide messaging' enabled.
      Test 1
      1. Log in as user A and send user C a few messages.
      2. Log in as user B and send user C a message.
      3. Log in as user C.
      4. Open the message drawer.
      5. Confirm you see the unread count next to Private (2).
      6. Click on the drop-down.
      7. Confirm you see the correct number of unread messages per conversation.
      Show
      Prerequisite. A site with three users. The setting 'Allow site-wide messaging' enabled. Test 1 Log in as user A and send user C a few messages. Log in as user B and send user C a message. Log in as user C. Open the message drawer. Confirm you see the unread count next to Private (2). Click on the drop-down. Confirm you see the correct number of unread messages per conversation.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.6 Branch:
    • Pull Master Branch:
      MDL-64566_master

      Description

      We can improve performance by simply removing $unreadcounts = \core_message\api::get_unread_conversation_counts($USER->id);

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Mar/19

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m