Searching comments in Comment Search doesn't return results if username contains upper case characters

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 4.6.1, 4.7.0, 4.7.1
    • Component/s: Search
    • None
    • Severity 3 - Minor
    • 0

      Issue Summary

      Steps to Reproduce

      1. Create a new user  (username lowercase only, like usera).
      2. Create a new user (start with uppercase, like Userb).
      3. Add a comment to a review with usera and Userb.
      4. Go to Review Dashboard -> Search comments.
      5. All comments are displayed.
      6. Select comment author: usera and click Search.
      7. Select comment author: Userb and click Search.

      Expected Results

      Ad 5. All comments (usera and Userb) are displayed. 

      Ad 6. Comments by usera are displayed.

      Ad 7. Comments by Userb are displayed.

      Actual Results

      Ad 5. As expected All comments (usera and Userb) are displayed. 

      Ad 6. As expected (Comments by usera are displayed)

      Ad 7. Comments by Userb are not displayed.

      Notes

      It seems like the username input for the filter is not changed to lowercase, whereas the search comment function indexes all comments authors in lower case.

      Because of that, it tries to compare:

      input_username == lower(comment_username)

      instead of:

      lower(input_username) == lower(comment_username).

      (variables names made up just for illustration).

      Please note it's a username that gets compared, not a display name. Changing the display name doesn't help.

      Workaround

      Change the username in URL itself after you click 'Search' to lower case only.

              Assignee:
              Unassigned
              Reporter:
              Tomasz Tokarczuk (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: