Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #1725 and related: make filter DateTimeOffset with Date work #1733

Merged
merged 1 commit into from
Jan 17, 2019

Conversation

xuzhg
Copy link
Member

@xuzhg xuzhg commented Jan 11, 2019

Issues

This pull request fixes issue #1725 and related.
Similar:

OData/odata.net#1205
#1473

It looks many customers complain about this regression. So, this PR is to fix the regression.

Now, with this change, you can run the "AspNewCoreODataSample.Web" and file requests:

http://localhost:5913/efcore/Movies?$filter=date(ReleaseDate) eq 2017-03-03
http://localhost:5913/efcore/Movies?$filter=ReleaseDate eq 2017-03-03

All can work.

Description

*Assumed a property named "ReleaseDate" as "Edm.DateTimeOffset", this change is to make the filters (as below) to work:

  1. $filter=ReleaseDate eq 2018-09-09
  2. $filter=date(ReleaseDate) eq 2018-09-09

Checklist (Uncheck if it is not completed)

  • [x ] Test cases added
  • [x ] Build and test with one-click build and test script passed

Additional work necessary

If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.

@xuzhg xuzhg added the Ready for review Use this label if a pull request is ready to be reviewed label Jan 11, 2019
@xuzhg xuzhg added this to the 7.2 milestone Jan 11, 2019
Copy link
Contributor

@KanishManuja-MS KanishManuja-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a simple E2E test case for this. May be in FilterBinderTests.cs.

@mikepizzo
Copy link
Member

Change looks good; would like to see some test cases.

Copy link
Member

@mikepizzo mikepizzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for review Use this label if a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants