{"action":"created","issue":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/2415","repository_url":"https://api.github.com/repos/keystonejs/keystone","labels_url":"https://api.github.com/repos/keystonejs/keystone/issues/2415/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone/issues/2415/comments","events_url":"https://api.github.com/repos/keystonejs/keystone/issues/2415/events","html_url":"https://github.com/keystonejs/keystone/pull/2415","id":140547344,"number":2415,"title":"Fix issue #2229: [0.4] Searching does not reset paging in list view","user":{"login":"suryagh","id":5177920,"avatar_url":"https://avatars.githubusercontent.com/u/5177920?v=3","gravatar_id":"","url":"https://api.github.com/users/suryagh","html_url":"https://github.com/suryagh","followers_url":"https://api.github.com/users/suryagh/followers","following_url":"https://api.github.com/users/suryagh/following{/other_user}","gists_url":"https://api.github.com/users/suryagh/gists{/gist_id}","starred_url":"https://api.github.com/users/suryagh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suryagh/subscriptions","organizations_url":"https://api.github.com/users/suryagh/orgs","repos_url":"https://api.github.com/users/suryagh/repos","events_url":"https://api.github.com/users/suryagh/events{/privacy}","received_events_url":"https://api.github.com/users/suryagh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T00:34:09Z","updated_at":"2016-03-14T10:45:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/keystonejs/keystone/pulls/2415","html_url":"https://github.com/keystonejs/keystone/pull/2415","diff_url":"https://github.com/keystonejs/keystone/pull/2415.diff","patch_url":"https://github.com/keystonejs/keystone/pull/2415.patch"},"body":"Fix for issue #2229\r\n\r\n**Problem** \r\nIssue was that the the query was skipping the `results` record even if the total `records count` was less than the `skip count`. \r\n\r\n**Solution** \r\nModified the query to `skip`, only if the `records count` is greater than `skip count`. Also, had to replace `async.series` with `async.waterfall` so that the query count can be passed to the `next` function.\r\n\r\n\r\n**Behaviour with this fix:**\r\n\r\n![keystone-2](https://cloud.githubusercontent.com/assets/5177920/13732459/ccc212b6-e959-11e5-98d2-f7691c30008c.gif)"},"comment":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/comments/196250848","html_url":"https://github.com/keystonejs/keystone/pull/2415#issuecomment-196250848","issue_url":"https://api.github.com/repos/keystonejs/keystone/issues/2415","id":196250848,"user":{"login":"JedWatson","id":872310,"avatar_url":"https://avatars.githubusercontent.com/u/872310?v=3","gravatar_id":"","url":"https://api.github.com/users/JedWatson","html_url":"https://github.com/JedWatson","followers_url":"https://api.github.com/users/JedWatson/followers","following_url":"https://api.github.com/users/JedWatson/following{/other_user}","gists_url":"https://api.github.com/users/JedWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/JedWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JedWatson/subscriptions","organizations_url":"https://api.github.com/users/JedWatson/orgs","repos_url":"https://api.github.com/users/JedWatson/repos","events_url":"https://api.github.com/users/JedWatson/events{/privacy}","received_events_url":"https://api.github.com/users/JedWatson/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T10:45:57Z","updated_at":"2016-03-14T10:45:57Z","body":"Nice fix @suryagh, thanks!"}}