{"action":"opened","number":958,"pull_request":{"url":"https://api.github.com/repos/medic/medic-webapp/pulls/958","id":35748528,"html_url":"https://github.com/medic/medic-webapp/pull/958","diff_url":"https://github.com/medic/medic-webapp/pull/958.diff","patch_url":"https://github.com/medic/medic-webapp/pull/958.patch","issue_url":"https://api.github.com/repos/medic/medic-webapp/issues/958","number":958,"state":"open","locked":false,"title":"Fix for #925: tag HTTP requests with their update target","user":{"login":"alxndrsn","id":191496,"avatar_url":"https://avatars.githubusercontent.com/u/191496?v=3","gravatar_id":"","url":"https://api.github.com/users/alxndrsn","html_url":"https://github.com/alxndrsn","followers_url":"https://api.github.com/users/alxndrsn/followers","following_url":"https://api.github.com/users/alxndrsn/following{/other_user}","gists_url":"https://api.github.com/users/alxndrsn/gists{/gist_id}","starred_url":"https://api.github.com/users/alxndrsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxndrsn/subscriptions","organizations_url":"https://api.github.com/users/alxndrsn/orgs","repos_url":"https://api.github.com/users/alxndrsn/repos","events_url":"https://api.github.com/users/alxndrsn/events{/privacy}","received_events_url":"https://api.github.com/users/alxndrsn/received_events","type":"User","site_admin":false},"body":"An alternative approach to (https://github.com/medic/medic-webapp/pull/955) for fixing #925.\r\n\r\nThis adds a new parameter for HTTP requests made through the\r\n`HttpWrapper` service - `updateTarget`.  Current options for\r\n`updateTarget` are `filter`, `left` and `right`, referring to different\r\nsections of the UI which an HTTP request might update on successful\r\ncompletion.\r\n\r\nWhen the user navigates to different states, the `stateChangeStart`\r\nlistener selectively cancels pending HTTP requests depending on the old\r\nand new states.\r\n\r\nThere are three tests which are broken by this commit.  They check that\r\nthe callback functions are working by testing that the error callbacks\r\nare executed for cancelled requests.  This commit changed the behaviour\r\nof the rest canceller from calling `resolve()` on request promises, to\r\ninstead calling `reject()`.  This seems to be better bahaviour, as it\r\nprevents the deliberately-cancelled requests from being handled as\r\nerrors, but it is not clear to me how the tests should be modified to\r\nreflect this change in behaviour.\r\n\r\n@garethbowen please review","created_at":"2015-05-19T16:23:12Z","updated_at":"2015-05-19T16:23:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/medic/medic-webapp/pulls/958/commits","review_comments_url":"https://api.github.com/repos/medic/medic-webapp/pulls/958/comments","review_comment_url":"https://api.github.com/repos/medic/medic-webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/medic/medic-webapp/issues/958/comments","statuses_url":"https://api.github.com/repos/medic/medic-webapp/statuses/63694e345497eaa48085ea8a6a7b5d8c834b8c9c","head":{"label":"medic:925_message-list-can-get-out-of-sync","ref":"925_message-list-can-get-out-of-sync","sha":"63694e345497eaa48085ea8a6a7b5d8c834b8c9c","user":{"login":"medic","id":474424,"avatar_url":"https://avatars.githubusercontent.com/u/474424?v=3","gravatar_id":"","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"repo":{"id":2698821,"name":"medic-webapp","full_name":"medic/medic-webapp","owner":{"login":"medic","id":474424,"avatar_url":"https://avatars.githubusercontent.com/u/474424?v=3","gravatar_id":"","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/medic/medic-webapp","description":"The Medic Mobile web application combines SMS messaging, data collection, and analytics for health workers and health systems in hard-to-reach areas with or without internet connectivity.","fork":false,"url":"https://api.github.com/repos/medic/medic-webapp","forks_url":"https://api.github.com/repos/medic/medic-webapp/forks","keys_url":"https://api.github.com/repos/medic/medic-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/medic/medic-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/medic/medic-webapp/teams","hooks_url":"https://api.github.com/repos/medic/medic-webapp/hooks","issue_events_url":"https://api.github.com/repos/medic/medic-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/medic/medic-webapp/events","assignees_url":"https://api.github.com/repos/medic/medic-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/medic/medic-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/medic/medic-webapp/tags","blobs_url":"https://api.github.com/repos/medic/medic-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/medic/medic-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/medic/medic-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/medic/medic-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/medic/medic-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/medic/medic-webapp/languages","stargazers_url":"https://api.github.com/repos/medic/medic-webapp/stargazers","contributors_url":"https://api.github.com/repos/medic/medic-webapp/contributors","subscribers_url":"https://api.github.com/repos/medic/medic-webapp/subscribers","subscription_url":"https://api.github.com/repos/medic/medic-webapp/subscription","commits_url":"https://api.github.com/repos/medic/medic-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/medic/medic-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/medic/medic-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/medic/medic-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/medic/medic-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/medic/medic-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/medic/medic-webapp/merges","archive_url":"https://api.github.com/repos/medic/medic-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/medic/medic-webapp/downloads","issues_url":"https://api.github.com/repos/medic/medic-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/medic/medic-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/medic/medic-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/medic/medic-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/medic/medic-webapp/labels{/name}","releases_url":"https://api.github.com/repos/medic/medic-webapp/releases{/id}","created_at":"2011-11-02T23:19:55Z","updated_at":"2015-05-08T14:48:07Z","pushed_at":"2015-05-19T16:22:10Z","git_url":"git://github.com/medic/medic-webapp.git","ssh_url":"git@github.com:medic/medic-webapp.git","clone_url":"https://github.com/medic/medic-webapp.git","svn_url":"https://github.com/medic/medic-webapp","homepage":"http://medicmobile.org/tools","size":34721,"stargazers_count":40,"watchers_count":40,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":77,"forks":18,"open_issues":77,"watchers":40,"default_branch":"develop"}},"base":{"label":"medic:develop","ref":"develop","sha":"19fffd2effbe43507ac38c7d54b39ced24be644f","user":{"login":"medic","id":474424,"avatar_url":"https://avatars.githubusercontent.com/u/474424?v=3","gravatar_id":"","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"repo":{"id":2698821,"name":"medic-webapp","full_name":"medic/medic-webapp","owner":{"login":"medic","id":474424,"avatar_url":"https://avatars.githubusercontent.com/u/474424?v=3","gravatar_id":"","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/medic/medic-webapp","description":"The Medic Mobile web application combines SMS messaging, data collection, and analytics for health workers and health systems in hard-to-reach areas with or without internet connectivity.","fork":false,"url":"https://api.github.com/repos/medic/medic-webapp","forks_url":"https://api.github.com/repos/medic/medic-webapp/forks","keys_url":"https://api.github.com/repos/medic/medic-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/medic/medic-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/medic/medic-webapp/teams","hooks_url":"https://api.github.com/repos/medic/medic-webapp/hooks","issue_events_url":"https://api.github.com/repos/medic/medic-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/medic/medic-webapp/events","assignees_url":"https://api.github.com/repos/medic/medic-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/medic/medic-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/medic/medic-webapp/tags","blobs_url":"https://api.github.com/repos/medic/medic-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/medic/medic-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/medic/medic-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/medic/medic-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/medic/medic-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/medic/medic-webapp/languages","stargazers_url":"https://api.github.com/repos/medic/medic-webapp/stargazers","contributors_url":"https://api.github.com/repos/medic/medic-webapp/contributors","subscribers_url":"https://api.github.com/repos/medic/medic-webapp/subscribers","subscription_url":"https://api.github.com/repos/medic/medic-webapp/subscription","commits_url":"https://api.github.com/repos/medic/medic-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/medic/medic-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/medic/medic-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/medic/medic-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/medic/medic-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/medic/medic-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/medic/medic-webapp/merges","archive_url":"https://api.github.com/repos/medic/medic-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/medic/medic-webapp/downloads","issues_url":"https://api.github.com/repos/medic/medic-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/medic/medic-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/medic/medic-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/medic/medic-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/medic/medic-webapp/labels{/name}","releases_url":"https://api.github.com/repos/medic/medic-webapp/releases{/id}","created_at":"2011-11-02T23:19:55Z","updated_at":"2015-05-08T14:48:07Z","pushed_at":"2015-05-19T16:22:10Z","git_url":"git://github.com/medic/medic-webapp.git","ssh_url":"git@github.com:medic/medic-webapp.git","clone_url":"https://github.com/medic/medic-webapp.git","svn_url":"https://github.com/medic/medic-webapp","homepage":"http://medicmobile.org/tools","size":34721,"stargazers_count":40,"watchers_count":40,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":77,"forks":18,"open_issues":77,"watchers":40,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/958"},"html":{"href":"https://github.com/medic/medic-webapp/pull/958"},"issue":{"href":"https://api.github.com/repos/medic/medic-webapp/issues/958"},"comments":{"href":"https://api.github.com/repos/medic/medic-webapp/issues/958/comments"},"review_comments":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/958/comments"},"review_comment":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/958/commits"},"statuses":{"href":"https://api.github.com/repos/medic/medic-webapp/statuses/63694e345497eaa48085ea8a6a7b5d8c834b8c9c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":38,"deletions":24,"changed_files":5}}