Wrong interpretation of NumberInt("1") when creating a pipeline from text

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.31.0
    • Affects Version/s: 1.20.1
    • Component/s: Compass
    • None
    • Environment:
      MacOS
    • Not Needed
    • None

      Steps to reproduce:

      1. In the aggregations app of compass, click on the 'down-arrow' right to the "+" sign, to open the dropdown-menu and then choose 'New Pipeline from text'. 
      2. Paste the following Text:

        [ {"$project": {"_id": NumberInt("1")}} ]

       

      Current Result:

      A new pipeline is created with the following conent:

      {
      _id: NumberInt

      Unknown macro: {'[object Object]') }

      Below the step, the following error Message is displayed:

      "Expected "[" or AggregationStage but "{" found."

       

      Expected result:

      The new pipeline should have the following content:

      Unknown macro: { _id}

       

       

              Assignee:
              Unassigned
              Reporter:
              Roman Lehnert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: