Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7008

`$regex` shows as `pattern` in Queries>Recent

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.43.2
    • Affects Version/s: 1.38.2
    • Component/s: Query, Query Bar, Query History
    • None
    • Environment:
      OS: macOS
      node.js / npm versions:
      Additional info:
    • 3
    • Not Needed
    • Iteration Dobsonian

      Problem Statement/Rationale

      $regex item in query is kept as pattern in  query history. 'pattern' doesn't work.

      The query needs to be kept without any change.

      Steps to Reproduce

      How could an engineer replicate the issue you’re reporting?

      1. I created a query in the `Filter` window. The query contained a $regex key. the query works as expected.
      2. I clicked on the clock icon and found the query in the 'Recents' list
      3. The query in the list does not contain '$regex'. Instead there is 'pattern' (with the specified value) and 'options' (with empty string).
      4. When clicking on this query, and applying it, no document is found.

      Expected Results

      There should be `$regex` in the recent query.

      Actual Results

      There is 'pattern' in the recent query, and this query doesn't retrieve any document.

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            amirp@senser.tech Amir Paster
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: