{"action":"created","comment":{"url":"https://api.github.com/repos/flavour/eden/pulls/comments/53151621","id":53151621,"diff_hunk":"@@ -774,6 +774,41 @@ def postp(r, output):\n         if r.interactive:\n             if get_vars.get(\"_next\"):\n                 r.next = get_vars.get(\"_next\")\n+            if r.component_name == \"info\" and \\\n+               r.component_id is not None and \\\n+               len(r.post_vars) > 0:\n+                # When an info segment is saved,\n+                # update all other segments with non-language specific data\n+                post_vars_get = r.post_vars.get\n+                print r.post_vars\n+                web = \"%s%s\" % (settings.get_base_public_url(),\n+                                URL(c=\"cap\", f=\"alert\", args=r.id)) \\\n+                      if post_vars_get(\"web\") in (\"\", None) else post_vars_get(\"web\")\n+                        \n+                idata = {\"priority\"  : post_vars_get(\"priority\", None),\n+                         \"urgency\"   : post_vars_get(\"urgency\", None),\n+                         \"severity\"  : post_vars_get(\"severity\", None),\n+                         \"certainty\" : post_vars_get(\"certainty\", None),\n+                         # Make datetime format to parse in s3_datetime format (HH:MM:SS)\n+                         \"effective\" : None if post_vars_get(\"effective\") in (\"\", None)\n+                                       else \"%s:%02d\" % (post_vars_get(\"effective\"), 0),\n+                         \"onset\"     : None if post_vars_get(\"onset\") in (\"\", None)\n+                                       else \"%s:%02d\" % (post_vars_get(\"onset\"), 0),\n+                         \"expires\"   : None if post_vars_get(\"expires\") in (\"\", None)\n+                                       else \"%s:%02d\" % (post_vars_get(\"expires\"), 0),\n+                         \"web\"       : web,\n+                         }\n+                \n+                current_info_id = int(r.component_id)\n+                table = db.cap_alert\n+                itable = s3db.cap_info\n+                rows = db(itable.alert_id == r.id).select(itable.id)","path":"controllers/cap.py","position":32,"original_position":32,"commit_id":"5f172b55501abcd8505282c640026934963fa29e","original_commit_id":"5f172b55501abcd8505282c640026934963fa29e","user":{"login":"flavour","id":389592,"avatar_url":"https://avatars.githubusercontent.com/u/389592?v=3","gravatar_id":"","url":"https://api.github.com/users/flavour","html_url":"https://github.com/flavour","followers_url":"https://api.github.com/users/flavour/followers","following_url":"https://api.github.com/users/flavour/following{/other_user}","gists_url":"https://api.github.com/users/flavour/gists{/gist_id}","starred_url":"https://api.github.com/users/flavour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flavour/subscriptions","organizations_url":"https://api.github.com/users/flavour/orgs","repos_url":"https://api.github.com/users/flavour/repos","events_url":"https://api.github.com/users/flavour/events{/privacy}","received_events_url":"https://api.github.com/users/flavour/received_events","type":"User","site_admin":false},"body":"I guess we should filter out deleted segments here too?","created_at":"2016-02-17T11:30:15Z","updated_at":"2016-02-17T11:30:15Z","html_url":"https://github.com/flavour/eden/pull/1224#discussion_r53151621","pull_request_url":"https://api.github.com/repos/flavour/eden/pulls/1224","_links":{"self":{"href":"https://api.github.com/repos/flavour/eden/pulls/comments/53151621"},"html":{"href":"https://github.com/flavour/eden/pull/1224#discussion_r53151621"},"pull_request":{"href":"https://api.github.com/repos/flavour/eden/pulls/1224"}}},"pull_request":{"url":"https://api.github.com/repos/flavour/eden/pulls/1224","id":59598598,"html_url":"https://github.com/flavour/eden/pull/1224","diff_url":"https://github.com/flavour/eden/pull/1224.diff","patch_url":"https://github.com/flavour/eden/pull/1224.patch","issue_url":"https://api.github.com/repos/flavour/eden/issues/1224","number":1224,"state":"open","locked":false,"title":"CAP: update other info segment field if one info segment is updated + SAMBRO: fix permission + SAMBRO: update url fix for subscription","user":{"login":"biplovbhandari","id":4207677,"avatar_url":"https://avatars.githubusercontent.com/u/4207677?v=3","gravatar_id":"","url":"https://api.github.com/users/biplovbhandari","html_url":"https://github.com/biplovbhandari","followers_url":"https://api.github.com/users/biplovbhandari/followers","following_url":"https://api.github.com/users/biplovbhandari/following{/other_user}","gists_url":"https://api.github.com/users/biplovbhandari/gists{/gist_id}","starred_url":"https://api.github.com/users/biplovbhandari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biplovbhandari/subscriptions","organizations_url":"https://api.github.com/users/biplovbhandari/orgs","repos_url":"https://api.github.com/users/biplovbhandari/repos","events_url":"https://api.github.com/users/biplovbhandari/events{/privacy}","received_events_url":"https://api.github.com/users/biplovbhandari/received_events","type":"User","site_admin":false},"body":"@flavour Please merge","created_at":"2016-02-17T05:36:37Z","updated_at":"2016-02-17T11:30:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c357bb7d2bda8642033dee9f3d45ef24da903b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flavour/eden/pulls/1224/commits","review_comments_url":"https://api.github.com/repos/flavour/eden/pulls/1224/comments","review_comment_url":"https://api.github.com/repos/flavour/eden/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flavour/eden/issues/1224/comments","statuses_url":"https://api.github.com/repos/flavour/eden/statuses/5f172b55501abcd8505282c640026934963fa29e","head":{"label":"biplovbhandari:bugfix","ref":"bugfix","sha":"5f172b55501abcd8505282c640026934963fa29e","user":{"login":"biplovbhandari","id":4207677,"avatar_url":"https://avatars.githubusercontent.com/u/4207677?v=3","gravatar_id":"","url":"https://api.github.com/users/biplovbhandari","html_url":"https://github.com/biplovbhandari","followers_url":"https://api.github.com/users/biplovbhandari/followers","following_url":"https://api.github.com/users/biplovbhandari/following{/other_user}","gists_url":"https://api.github.com/users/biplovbhandari/gists{/gist_id}","starred_url":"https://api.github.com/users/biplovbhandari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biplovbhandari/subscriptions","organizations_url":"https://api.github.com/users/biplovbhandari/orgs","repos_url":"https://api.github.com/users/biplovbhandari/repos","events_url":"https://api.github.com/users/biplovbhandari/events{/privacy}","received_events_url":"https://api.github.com/users/biplovbhandari/received_events","type":"User","site_admin":false},"repo":{"id":37774689,"name":"eden","full_name":"biplovbhandari/eden","owner":{"login":"biplovbhandari","id":4207677,"avatar_url":"https://avatars.githubusercontent.com/u/4207677?v=3","gravatar_id":"","url":"https://api.github.com/users/biplovbhandari","html_url":"https://github.com/biplovbhandari","followers_url":"https://api.github.com/users/biplovbhandari/followers","following_url":"https://api.github.com/users/biplovbhandari/following{/other_user}","gists_url":"https://api.github.com/users/biplovbhandari/gists{/gist_id}","starred_url":"https://api.github.com/users/biplovbhandari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biplovbhandari/subscriptions","organizations_url":"https://api.github.com/users/biplovbhandari/orgs","repos_url":"https://api.github.com/users/biplovbhandari/repos","events_url":"https://api.github.com/users/biplovbhandari/events{/privacy}","received_events_url":"https://api.github.com/users/biplovbhandari/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/biplovbhandari/eden","description":"Sahana Eden is an Open Source Humanitarian Platform which can be used to provide solutions for Disaster Management, Development, and Environmental Management sectors.. Please sign CLA when submitting pull requests: http://bit.ly/SSF-eCLA","fork":true,"url":"https://api.github.com/repos/biplovbhandari/eden","forks_url":"https://api.github.com/repos/biplovbhandari/eden/forks","keys_url":"https://api.github.com/repos/biplovbhandari/eden/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biplovbhandari/eden/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biplovbhandari/eden/teams","hooks_url":"https://api.github.com/repos/biplovbhandari/eden/hooks","issue_events_url":"https://api.github.com/repos/biplovbhandari/eden/issues/events{/number}","events_url":"https://api.github.com/repos/biplovbhandari/eden/events","assignees_url":"https://api.github.com/repos/biplovbhandari/eden/assignees{/user}","branches_url":"https://api.github.com/repos/biplovbhandari/eden/branches{/branch}","tags_url":"https://api.github.com/repos/biplovbhandari/eden/tags","blobs_url":"https://api.github.com/repos/biplovbhandari/eden/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biplovbhandari/eden/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biplovbhandari/eden/git/refs{/sha}","trees_url":"https://api.github.com/repos/biplovbhandari/eden/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biplovbhandari/eden/statuses/{sha}","languages_url":"https://api.github.com/repos/biplovbhandari/eden/languages","stargazers_url":"https://api.github.com/repos/biplovbhandari/eden/stargazers","contributors_url":"https://api.github.com/repos/biplovbhandari/eden/contributors","subscribers_url":"https://api.github.com/repos/biplovbhandari/eden/subscribers","subscription_url":"https://api.github.com/repos/biplovbhandari/eden/subscription","commits_url":"https://api.github.com/repos/biplovbhandari/eden/commits{/sha}","git_commits_url":"https://api.github.com/repos/biplovbhandari/eden/git/commits{/sha}","comments_url":"https://api.github.com/repos/biplovbhandari/eden/comments{/number}","issue_comment_url":"https://api.github.com/repos/biplovbhandari/eden/issues/comments{/number}","contents_url":"https://api.github.com/repos/biplovbhandari/eden/contents/{+path}","compare_url":"https://api.github.com/repos/biplovbhandari/eden/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biplovbhandari/eden/merges","archive_url":"https://api.github.com/repos/biplovbhandari/eden/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biplovbhandari/eden/downloads","issues_url":"https://api.github.com/repos/biplovbhandari/eden/issues{/number}","pulls_url":"https://api.github.com/repos/biplovbhandari/eden/pulls{/number}","milestones_url":"https://api.github.com/repos/biplovbhandari/eden/milestones{/number}","notifications_url":"https://api.github.com/repos/biplovbhandari/eden/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biplovbhandari/eden/labels{/name}","releases_url":"https://api.github.com/repos/biplovbhandari/eden/releases{/id}","deployments_url":"https://api.github.com/repos/biplovbhandari/eden/deployments","created_at":"2015-06-20T15:32:51Z","updated_at":"2016-01-18T02:18:09Z","pushed_at":"2016-02-17T06:05:12Z","git_url":"git://github.com/biplovbhandari/eden.git","ssh_url":"git@github.com:biplovbhandari/eden.git","clone_url":"https://github.com/biplovbhandari/eden.git","svn_url":"https://github.com/biplovbhandari/eden","homepage":"http://eden.sahanafoundation.org","size":144348,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flavour:master","ref":"master","sha":"9cf3e19104d79ae78eb2e7bcb95bfee94cf376c8","user":{"login":"flavour","id":389592,"avatar_url":"https://avatars.githubusercontent.com/u/389592?v=3","gravatar_id":"","url":"https://api.github.com/users/flavour","html_url":"https://github.com/flavour","followers_url":"https://api.github.com/users/flavour/followers","following_url":"https://api.github.com/users/flavour/following{/other_user}","gists_url":"https://api.github.com/users/flavour/gists{/gist_id}","starred_url":"https://api.github.com/users/flavour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flavour/subscriptions","organizations_url":"https://api.github.com/users/flavour/orgs","repos_url":"https://api.github.com/users/flavour/repos","events_url":"https://api.github.com/users/flavour/events{/privacy}","received_events_url":"https://api.github.com/users/flavour/received_events","type":"User","site_admin":false},"repo":{"id":3021325,"name":"eden","full_name":"flavour/eden","owner":{"login":"flavour","id":389592,"avatar_url":"https://avatars.githubusercontent.com/u/389592?v=3","gravatar_id":"","url":"https://api.github.com/users/flavour","html_url":"https://github.com/flavour","followers_url":"https://api.github.com/users/flavour/followers","following_url":"https://api.github.com/users/flavour/following{/other_user}","gists_url":"https://api.github.com/users/flavour/gists{/gist_id}","starred_url":"https://api.github.com/users/flavour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flavour/subscriptions","organizations_url":"https://api.github.com/users/flavour/orgs","repos_url":"https://api.github.com/users/flavour/repos","events_url":"https://api.github.com/users/flavour/events{/privacy}","received_events_url":"https://api.github.com/users/flavour/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flavour/eden","description":"Sahana Eden is an Open Source Humanitarian Platform which can be used to provide solutions for Disaster Management, Development, and Environmental Management sectors.. Please sign CLA when submitting pull requests: http://bit.ly/SSF-eCLA","fork":false,"url":"https://api.github.com/repos/flavour/eden","forks_url":"https://api.github.com/repos/flavour/eden/forks","keys_url":"https://api.github.com/repos/flavour/eden/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flavour/eden/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flavour/eden/teams","hooks_url":"https://api.github.com/repos/flavour/eden/hooks","issue_events_url":"https://api.github.com/repos/flavour/eden/issues/events{/number}","events_url":"https://api.github.com/repos/flavour/eden/events","assignees_url":"https://api.github.com/repos/flavour/eden/assignees{/user}","branches_url":"https://api.github.com/repos/flavour/eden/branches{/branch}","tags_url":"https://api.github.com/repos/flavour/eden/tags","blobs_url":"https://api.github.com/repos/flavour/eden/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flavour/eden/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flavour/eden/git/refs{/sha}","trees_url":"https://api.github.com/repos/flavour/eden/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flavour/eden/statuses/{sha}","languages_url":"https://api.github.com/repos/flavour/eden/languages","stargazers_url":"https://api.github.com/repos/flavour/eden/stargazers","contributors_url":"https://api.github.com/repos/flavour/eden/contributors","subscribers_url":"https://api.github.com/repos/flavour/eden/subscribers","subscription_url":"https://api.github.com/repos/flavour/eden/subscription","commits_url":"https://api.github.com/repos/flavour/eden/commits{/sha}","git_commits_url":"https://api.github.com/repos/flavour/eden/git/commits{/sha}","comments_url":"https://api.github.com/repos/flavour/eden/comments{/number}","issue_comment_url":"https://api.github.com/repos/flavour/eden/issues/comments{/number}","contents_url":"https://api.github.com/repos/flavour/eden/contents/{+path}","compare_url":"https://api.github.com/repos/flavour/eden/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flavour/eden/merges","archive_url":"https://api.github.com/repos/flavour/eden/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flavour/eden/downloads","issues_url":"https://api.github.com/repos/flavour/eden/issues{/number}","pulls_url":"https://api.github.com/repos/flavour/eden/pulls{/number}","milestones_url":"https://api.github.com/repos/flavour/eden/milestones{/number}","notifications_url":"https://api.github.com/repos/flavour/eden/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flavour/eden/labels{/name}","releases_url":"https://api.github.com/repos/flavour/eden/releases{/id}","deployments_url":"https://api.github.com/repos/flavour/eden/deployments","created_at":"2011-12-20T17:49:16Z","updated_at":"2016-01-11T08:08:44Z","pushed_at":"2016-02-17T09:31:58Z","git_url":"git://github.com/flavour/eden.git","ssh_url":"git@github.com:flavour/eden.git","clone_url":"https://github.com/flavour/eden.git","svn_url":"https://github.com/flavour/eden","homepage":"http://eden.sahanafoundation.org","size":174904,"stargazers_count":179,"watchers_count":179,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":438,"mirror_url":null,"open_issues_count":57,"forks":438,"open_issues":57,"watchers":179,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flavour/eden/pulls/1224"},"html":{"href":"https://github.com/flavour/eden/pull/1224"},"issue":{"href":"https://api.github.com/repos/flavour/eden/issues/1224"},"comments":{"href":"https://api.github.com/repos/flavour/eden/issues/1224/comments"},"review_comments":{"href":"https://api.github.com/repos/flavour/eden/pulls/1224/comments"},"review_comment":{"href":"https://api.github.com/repos/flavour/eden/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flavour/eden/pulls/1224/commits"},"statuses":{"href":"https://api.github.com/repos/flavour/eden/statuses/5f172b55501abcd8505282c640026934963fa29e"}}}}