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

Messaging: search is displaying homepage instead of search results when going back

    XMLWordPrintable

    Details

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

      Setup

      1. Log in as an admin.
      2. Enable site wide messaging (site admin -> messaging -> messaging settings -> messagingallusers)
      3. Create three new users: s1, s2 and s3.
      4. Add 's1' as a contact to 's2' and accept the request.
      5. As a 's1', 's2' and 's3' users, go to their preferences and select on Privacy section the option 'Anyone on the site'.
      6. Send some message between 's1' and 's2' with the text: 'Searching messages'.

      Tests

      Tests Search users and going back to search results

      1. Log in as "s1".
      2. Go to messaging.
      3. Type on the search box the letter 's'.
      4. You should see on the results, three sections, Contacts, No contacts and Messages.
      5. Click on user 's2' in the section Contacts.
      6. You should see a conversation with 's2'.
      7. Go back clicking on the icon '<'.
      8. EXPECTED RESULT: You should back to the search results.
      9. Click on user 's3' in the sections No contacts.
      10. You should see a conversation with 's3'.
      11. Go back clicking on the icon '<'.
      12. EXPECTED RESULT: You should back to the search results.
      13. Click on user 's2' in the sections Message.
      14. You should see a conversation with 's2'.
      15. Go back clicking on the icon '<'.
      16. EXPECTED RESULT: You should back to the search results.
      Show
      Setup Log in as an admin. Enable site wide messaging (site admin -> messaging -> messaging settings -> messagingallusers) Create three new users: s1, s2 and s3. Add 's1' as a contact to 's2' and accept the request. As a 's1', 's2' and 's3' users, go to their preferences and select on Privacy section the option 'Anyone on the site'. Send some message between 's1' and 's2' with the text: 'Searching messages'. Tests Tests Search users and going back to search results Log in as "s1". Go to messaging. Type on the search box the letter 's'. You should see on the results, three sections, Contacts, No contacts and Messages. Click on user 's2' in the section Contacts. You should see a conversation with 's2'. Go back clicking on the icon '<'. EXPECTED RESULT: You should back to the search results. Click on user 's3' in the sections No contacts. You should see a conversation with 's3'. Go back clicking on the icon '<'. EXPECTED RESULT: You should back to the search results. Click on user 's2' in the sections Message. You should see a conversation with 's2'. Go back clicking on the icon '<'. EXPECTED RESULT: You should back to the search results.
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull Master Branch:
      MDL-65254-master

      Description

      A change in the behaviour in the search results on messaging drawer has been found by Amaia Anabitarte while working on the behat tests: if you search for a user and click to see user's profile, when you go back in the drawer you go to search results again in 3.6, but to messaging 'homepage' in master. From the messaging 'homepage', when the user wants to search again, the text field is displayed empty until the user click on it; then it's filled with the previous search text (this is happening only in master again).

      Besides, the following error is displayed in the Javascript console after clicking over the user: 

      Uncaught TypeError: header.find is not a function
      at getSearchInput (first.js:33799)
      at description (first.js:34625)
      at go (first.js:36134)
      at HTMLAnchorElement.<anonymous> (first.js:39595)
      at HTMLDivElement.dispatch (jquery-3.2.1.js:5206)
      at HTMLDivElement.elemData.handle (jquery-3.2.1.js:5014)
      at Object.trigger (jquery-3.2.1.js:8201)
      at HTMLHeadingElement.<anonymous> (jquery-3.2.1.js:8269)
      at Function.each (jquery-3.2.1.js:362)
      at jQuery.fn.init.each (jquery-3.2.1.js:157)

       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  20/May/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours, 15 minutes
                  5h 15m