{"action":"created","issue":{"url":"https://api.github.com/repos/dadi/api/issues/394","repository_url":"https://api.github.com/repos/dadi/api","labels_url":"https://api.github.com/repos/dadi/api/issues/394/labels{/name}","comments_url":"https://api.github.com/repos/dadi/api/issues/394/comments","events_url":"https://api.github.com/repos/dadi/api/issues/394/events","html_url":"https://github.com/dadi/api/issues/394","id":302620165,"number":394,"title":"Unable to filter by schema default ISO dates","user":{"login":"abovedave","id":649231,"avatar_url":"https://avatars0.githubusercontent.com/u/649231?v=4","gravatar_id":"","url":"https://api.github.com/users/abovedave","html_url":"https://github.com/abovedave","followers_url":"https://api.github.com/users/abovedave/followers","following_url":"https://api.github.com/users/abovedave/following{/other_user}","gists_url":"https://api.github.com/users/abovedave/gists{/gist_id}","starred_url":"https://api.github.com/users/abovedave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abovedave/subscriptions","organizations_url":"https://api.github.com/users/abovedave/orgs","repos_url":"https://api.github.com/users/abovedave/repos","events_url":"https://api.github.com/users/abovedave/events{/privacy}","received_events_url":"https://api.github.com/users/abovedave/received_events","type":"User","site_admin":false},"labels":[{"id":301294230,"url":"https://api.github.com/repos/dadi/api/labels/type:%20bug","name":"type: bug","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-06T09:17:58Z","updated_at":"2018-03-06T09:38:05Z","closed_at":null,"author_association":"OWNER","body":"### Expected behavior\r\n\r\nReturn an appropriate subset of results, when I pass a filter with the date format matching the schema default.\r\n\r\n### Actual behavior\r\n\r\nNo results returned.\r\n\r\n### Steps to reproduce the problem\r\n\r\nExample field schema:\r\n\r\nSet a date field in the schema:\r\n\r\n```json\r\n\"date\": {\r\n  \"type\": \"DateTime\",\r\n  \"required\": true,\r\n  \"label\": \"Date & Time\"\r\n}\r\n```\r\n\r\nCreate some test content with varying dates, then attempt to pass a filter e.g.,\r\n\r\n```\r\n{\"date\":{\"$gt\":\"2016-01-01T00:00:00.000Z\"}}\r\n```\r\n\r\nor a range\r\n\r\n```\r\n{\"date\":{\"$gte\":\"2018-02-04T08:57:23.191Z\",\"$lte\":\"2018-04-05T07:57:23.193Z\"}}\r\n```\r\n\r\n**In addition it might be worth setting the default date format in the schema to be `\"format\": \"unix\"` to match the auto-generated fields such a `_createdAt`** \r\n\r\n### Package details\r\n\r\nDADI API 3.x\r\n"},"comment":{"url":"https://api.github.com/repos/dadi/api/issues/comments/370721152","html_url":"https://github.com/dadi/api/issues/394#issuecomment-370721152","issue_url":"https://api.github.com/repos/dadi/api/issues/394","id":370721152,"user":{"login":"abovedave","id":649231,"avatar_url":"https://avatars0.githubusercontent.com/u/649231?v=4","gravatar_id":"","url":"https://api.github.com/users/abovedave","html_url":"https://github.com/abovedave","followers_url":"https://api.github.com/users/abovedave/followers","following_url":"https://api.github.com/users/abovedave/following{/other_user}","gists_url":"https://api.github.com/users/abovedave/gists{/gist_id}","starred_url":"https://api.github.com/users/abovedave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abovedave/subscriptions","organizations_url":"https://api.github.com/users/abovedave/orgs","repos_url":"https://api.github.com/users/abovedave/repos","events_url":"https://api.github.com/users/abovedave/events{/privacy}","received_events_url":"https://api.github.com/users/abovedave/received_events","type":"User","site_admin":false},"created_at":"2018-03-06T09:38:05Z","updated_at":"2018-03-06T09:38:05Z","author_association":"OWNER","body":"\r\n\r\n[articles.txt](https://github.com/dadi/api/files/1784356/articles.txt)\r\n"}}
{"actor":{"display_login":"abovedave"}}