Skip to content

Aggregate match doesn't work with custom date field #6333

Open
@JeromeDeLeon

Description

@JeromeDeLeon

Issue Description

The problem still persist when doing aggregate with customFieldDate as pointed out by this scenario.

This is my scenario of aggregation. I have tried this one using MongoDB Compass to simulate the results and that works.

[
  {
    group: {
      _id: "$shiftId",
      openedAt: {
        $first: "$shift._created_at"
      }
    }
  },
  {
    match: {
      openedAt: {
        $gte: new Date()
      }
    }
  }
]

Steps to reproduce

Create an aggregation similar to above sample.

Expected Results

Empty array

Actual Outcome

Results filtered by openedAt

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 3.10.0
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost
  • Database

    • MongoDB version: 3.4
    • Storage engine: WiredTiger
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): localhost

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions