{"action":"created","issue":{"url":"https://api.github.com/repos/dimagi/commcare-hq/issues/7046","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/7046/labels{/name}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/7046/comments","events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/7046/events","html_url":"https://github.com/dimagi/commcare-hq/pull/7046","id":87072145,"number":7046,"title":"Add [Project Data] option to case list report","user":{"login":"esoergel","id":2367539,"avatar_url":"https://avatars.githubusercontent.com/u/2367539?v=3","gravatar_id":"","url":"https://api.github.com/users/esoergel","html_url":"https://github.com/esoergel","followers_url":"https://api.github.com/users/esoergel/followers","following_url":"https://api.github.com/users/esoergel/following{/other_user}","gists_url":"https://api.github.com/users/esoergel/gists{/gist_id}","starred_url":"https://api.github.com/users/esoergel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esoergel/subscriptions","organizations_url":"https://api.github.com/users/esoergel/orgs","repos_url":"https://api.github.com/users/esoergel/repos","events_url":"https://api.github.com/users/esoergel/events{/privacy}","received_events_url":"https://api.github.com/users/esoergel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dimagi/commcare-hq/labels/No%20lint%20errors","name":"No lint errors","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-10T19:04:12Z","updated_at":"2015-06-15T14:24:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/7046","html_url":"https://github.com/dimagi/commcare-hq/pull/7046","diff_url":"https://github.com/dimagi/commcare-hq/pull/7046.diff","patch_url":"https://github.com/dimagi/commcare-hq/pull/7046.patch"},"body":"@sravfeyn\r\nhttp://manage.dimagi.com/default.asp?166981\r\nThis might be easiest commit-by-commit.  This PR does a few things:\r\n\r\nIt explicitly makes a CaseListFilter subclass of the ExpandedMobileWorkerFilter, and pulls out the logic specific to that use-case there.  It's significantly different from the original filter, and this is clearer when each behavior is used.\r\n\r\nThis moves the build_query method of the case list report to use ESQuery, which is easier to read and reason about.\r\n\r\nThe CaseListFilter now has no [All Mobile Workers] option anymore, instead it has [Project Data] and [All Data] options.  [All Data] doesn't filter on owner id at all.  [Project Data] filters out stuff we know to be most likely not relevant.  If neither is selected, it falls back to the old behavior of getting an exact set of possible owner_ids and only showing matches.\r\n\r\nedit: This is currently on staging, and I just went over it with Sheel to make sure it looks good and does what we want.  That's not exactly QA, but it's something."},"comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments/112088661","html_url":"https://github.com/dimagi/commcare-hq/pull/7046#issuecomment-112088661","issue_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/7046","id":112088661,"user":{"login":"esoergel","id":2367539,"avatar_url":"https://avatars.githubusercontent.com/u/2367539?v=3","gravatar_id":"","url":"https://api.github.com/users/esoergel","html_url":"https://github.com/esoergel","followers_url":"https://api.github.com/users/esoergel/followers","following_url":"https://api.github.com/users/esoergel/following{/other_user}","gists_url":"https://api.github.com/users/esoergel/gists{/gist_id}","starred_url":"https://api.github.com/users/esoergel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esoergel/subscriptions","organizations_url":"https://api.github.com/users/esoergel/orgs","repos_url":"https://api.github.com/users/esoergel/repos","events_url":"https://api.github.com/users/esoergel/events{/privacy}","received_events_url":"https://api.github.com/users/esoergel/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T14:24:43Z","updated_at":"2015-06-15T14:24:43Z","body":"@czue I looked at it with Sheel, and it worked as we expected.  I asked him to take another, more thorough pass, which I'm waiting to hear back on."}}