{"action":"created","comment":{"url":"https://api.github.com/repos/CanalTP/navitia/pulls/comments/45047896","id":45047896,"diff_hunk":"@@ -95,7 +121,76 @@ create_disruption(const std::string& id,\n         impact->created_at = timestamp;\n         impact->updated_at = timestamp;\n         impact->application_periods.push_back(execution_period(circulation_date, mvj));\n-        impact->severity = make_no_service_severity(timestamp, holder);\n+        std::string wording;\n+        nt::disruption::Effect effect;\n+        if (trip_update.trip().schedule_relationship() == transit_realtime::TripDescriptor_ScheduleRelationship_CANCELED) {\n+            LOG4CPLUS_TRACE(log, \"Disruption has NO_SERVICE effect\");\n+            // Yeah, that's quite hardcodded...\n+            wording = \"trip canceled!\";\n+            effect = nt::disruption::Effect::NO_SERVICE;\n+        }\n+        else if (trip_update.trip().schedule_relationship() == transit_realtime::TripDescriptor_ScheduleRelationship_SCHEDULED\n+                && trip_update.stop_time_update_size()) {\n+            LOG4CPLUS_TRACE(log, \"Disruption has MODIFIED_SERVICE effect\");\n+            // Yeah, that's quite hardcodded...\n+            wording = \"trip modified!\";\n+            effect = nt::disruption::Effect::MODIFIED_SERVICE;\n+            LOG4CPLUS_TRACE(log, \"Adding stop time into impact\");\n+            for (const auto& st: trip_update.stop_time_update()) {\n+                auto* stop_point_ptr = data.pt_data->stop_points_map[st.stop_id()];\n+                assert(stop_point_ptr);\n+                uint32_t arrival_time = st.arrival().time();\n+                uint32_t departure_time = st.departure().time();\n+                LOG4CPLUS_TRACE(log, \"arrival_time: \" << arrival_time);","path":"source/kraken/realtime.cpp","position":96,"original_position":96,"commit_id":"60faea8f99c7572eb04941f60f25de792d7aaf03","original_commit_id":"6505d6232e56243b73a621af3ed2f5b0af5e8b70","user":{"login":"xlqian","id":6093486,"avatar_url":"https://avatars.githubusercontent.com/u/6093486?v=3","gravatar_id":"","url":"https://api.github.com/users/xlqian","html_url":"https://github.com/xlqian","followers_url":"https://api.github.com/users/xlqian/followers","following_url":"https://api.github.com/users/xlqian/following{/other_user}","gists_url":"https://api.github.com/users/xlqian/gists{/gist_id}","starred_url":"https://api.github.com/users/xlqian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xlqian/subscriptions","organizations_url":"https://api.github.com/users/xlqian/orgs","repos_url":"https://api.github.com/users/xlqian/repos","events_url":"https://api.github.com/users/xlqian/events{/privacy}","received_events_url":"https://api.github.com/users/xlqian/received_events","type":"User","site_admin":false},"body":"removed","created_at":"2015-11-17T11:16:09Z","updated_at":"2015-11-17T11:16:09Z","html_url":"https://github.com/CanalTP/navitia/pull/1265#discussion_r45047896","pull_request_url":"https://api.github.com/repos/CanalTP/navitia/pulls/1265","_links":{"self":{"href":"https://api.github.com/repos/CanalTP/navitia/pulls/comments/45047896"},"html":{"href":"https://github.com/CanalTP/navitia/pull/1265#discussion_r45047896"},"pull_request":{"href":"https://api.github.com/repos/CanalTP/navitia/pulls/1265"}}},"pull_request":{"url":"https://api.github.com/repos/CanalTP/navitia/pulls/1265","id":50238402,"html_url":"https://github.com/CanalTP/navitia/pull/1265","diff_url":"https://github.com/CanalTP/navitia/pull/1265.diff","patch_url":"https://github.com/CanalTP/navitia/pull/1265.patch","issue_url":"https://api.github.com/repos/CanalTP/navitia/issues/1265","number":1265,"state":"open","locked":false,"title":"Kraken: fill ntfs object and create disruption from kirin","user":{"login":"xlqian","id":6093486,"avatar_url":"https://avatars.githubusercontent.com/u/6093486?v=3","gravatar_id":"","url":"https://api.github.com/users/xlqian","html_url":"https://github.com/xlqian","followers_url":"https://api.github.com/users/xlqian/followers","following_url":"https://api.github.com/users/xlqian/following{/other_user}","gists_url":"https://api.github.com/users/xlqian/gists{/gist_id}","starred_url":"https://api.github.com/users/xlqian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xlqian/subscriptions","organizations_url":"https://api.github.com/users/xlqian/orgs","repos_url":"https://api.github.com/users/xlqian/repos","events_url":"https://api.github.com/users/xlqian/events{/privacy}","received_events_url":"https://api.github.com/users/xlqian/received_events","type":"User","site_admin":false},"body":"http://jira.canaltp.fr/browse/NAVP-360","created_at":"2015-11-10T10:43:11Z","updated_at":"2015-11-17T11:16:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b93aa8527dcd4f05c8cf38126c31e3abffcd192","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CanalTP/navitia/pulls/1265/commits","review_comments_url":"https://api.github.com/repos/CanalTP/navitia/pulls/1265/comments","review_comment_url":"https://api.github.com/repos/CanalTP/navitia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CanalTP/navitia/issues/1265/comments","statuses_url":"https://api.github.com/repos/CanalTP/navitia/statuses/60faea8f99c7572eb04941f60f25de792d7aaf03","head":{"label":"xlqian:manage_delayed_vj_for_realtime","ref":"manage_delayed_vj_for_realtime","sha":"60faea8f99c7572eb04941f60f25de792d7aaf03","user":{"login":"xlqian","id":6093486,"avatar_url":"https://avatars.githubusercontent.com/u/6093486?v=3","gravatar_id":"","url":"https://api.github.com/users/xlqian","html_url":"https://github.com/xlqian","followers_url":"https://api.github.com/users/xlqian/followers","following_url":"https://api.github.com/users/xlqian/following{/other_user}","gists_url":"https://api.github.com/users/xlqian/gists{/gist_id}","starred_url":"https://api.github.com/users/xlqian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xlqian/subscriptions","organizations_url":"https://api.github.com/users/xlqian/orgs","repos_url":"https://api.github.com/users/xlqian/repos","events_url":"https://api.github.com/users/xlqian/events{/privacy}","received_events_url":"https://api.github.com/users/xlqian/received_events","type":"User","site_admin":false},"repo":{"id":38739156,"name":"navitia","full_name":"xlqian/navitia","owner":{"login":"xlqian","id":6093486,"avatar_url":"https://avatars.githubusercontent.com/u/6093486?v=3","gravatar_id":"","url":"https://api.github.com/users/xlqian","html_url":"https://github.com/xlqian","followers_url":"https://api.github.com/users/xlqian/followers","following_url":"https://api.github.com/users/xlqian/following{/other_user}","gists_url":"https://api.github.com/users/xlqian/gists{/gist_id}","starred_url":"https://api.github.com/users/xlqian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xlqian/subscriptions","organizations_url":"https://api.github.com/users/xlqian/orgs","repos_url":"https://api.github.com/users/xlqian/repos","events_url":"https://api.github.com/users/xlqian/events{/privacy}","received_events_url":"https://api.github.com/users/xlqian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xlqian/navitia","description":"The REST API to build cool stuff with public transport","fork":true,"url":"https://api.github.com/repos/xlqian/navitia","forks_url":"https://api.github.com/repos/xlqian/navitia/forks","keys_url":"https://api.github.com/repos/xlqian/navitia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xlqian/navitia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xlqian/navitia/teams","hooks_url":"https://api.github.com/repos/xlqian/navitia/hooks","issue_events_url":"https://api.github.com/repos/xlqian/navitia/issues/events{/number}","events_url":"https://api.github.com/repos/xlqian/navitia/events","assignees_url":"https://api.github.com/repos/xlqian/navitia/assignees{/user}","branches_url":"https://api.github.com/repos/xlqian/navitia/branches{/branch}","tags_url":"https://api.github.com/repos/xlqian/navitia/tags","blobs_url":"https://api.github.com/repos/xlqian/navitia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xlqian/navitia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xlqian/navitia/git/refs{/sha}","trees_url":"https://api.github.com/repos/xlqian/navitia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xlqian/navitia/statuses/{sha}","languages_url":"https://api.github.com/repos/xlqian/navitia/languages","stargazers_url":"https://api.github.com/repos/xlqian/navitia/stargazers","contributors_url":"https://api.github.com/repos/xlqian/navitia/contributors","subscribers_url":"https://api.github.com/repos/xlqian/navitia/subscribers","subscription_url":"https://api.github.com/repos/xlqian/navitia/subscription","commits_url":"https://api.github.com/repos/xlqian/navitia/commits{/sha}","git_commits_url":"https://api.github.com/repos/xlqian/navitia/git/commits{/sha}","comments_url":"https://api.github.com/repos/xlqian/navitia/comments{/number}","issue_comment_url":"https://api.github.com/repos/xlqian/navitia/issues/comments{/number}","contents_url":"https://api.github.com/repos/xlqian/navitia/contents/{+path}","compare_url":"https://api.github.com/repos/xlqian/navitia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xlqian/navitia/merges","archive_url":"https://api.github.com/repos/xlqian/navitia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xlqian/navitia/downloads","issues_url":"https://api.github.com/repos/xlqian/navitia/issues{/number}","pulls_url":"https://api.github.com/repos/xlqian/navitia/pulls{/number}","milestones_url":"https://api.github.com/repos/xlqian/navitia/milestones{/number}","notifications_url":"https://api.github.com/repos/xlqian/navitia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xlqian/navitia/labels{/name}","releases_url":"https://api.github.com/repos/xlqian/navitia/releases{/id}","created_at":"2015-07-08T07:34:43Z","updated_at":"2015-07-08T07:34:46Z","pushed_at":"2015-11-17T10:39:07Z","git_url":"git://github.com/xlqian/navitia.git","ssh_url":"git@github.com:xlqian/navitia.git","clone_url":"https://github.com/xlqian/navitia.git","svn_url":"https://github.com/xlqian/navitia","homepage":"http://www.navitia.io","size":26427,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"dev"}},"base":{"label":"CanalTP:dev","ref":"dev","sha":"5917f9b9b7d5a773162101b32cf9e3614704b47b","user":{"login":"CanalTP","id":2743985,"avatar_url":"https://avatars.githubusercontent.com/u/2743985?v=3","gravatar_id":"","url":"https://api.github.com/users/CanalTP","html_url":"https://github.com/CanalTP","followers_url":"https://api.github.com/users/CanalTP/followers","following_url":"https://api.github.com/users/CanalTP/following{/other_user}","gists_url":"https://api.github.com/users/CanalTP/gists{/gist_id}","starred_url":"https://api.github.com/users/CanalTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanalTP/subscriptions","organizations_url":"https://api.github.com/users/CanalTP/orgs","repos_url":"https://api.github.com/users/CanalTP/repos","events_url":"https://api.github.com/users/CanalTP/events{/privacy}","received_events_url":"https://api.github.com/users/CanalTP/received_events","type":"Organization","site_admin":false},"repo":{"id":10797333,"name":"navitia","full_name":"CanalTP/navitia","owner":{"login":"CanalTP","id":2743985,"avatar_url":"https://avatars.githubusercontent.com/u/2743985?v=3","gravatar_id":"","url":"https://api.github.com/users/CanalTP","html_url":"https://github.com/CanalTP","followers_url":"https://api.github.com/users/CanalTP/followers","following_url":"https://api.github.com/users/CanalTP/following{/other_user}","gists_url":"https://api.github.com/users/CanalTP/gists{/gist_id}","starred_url":"https://api.github.com/users/CanalTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanalTP/subscriptions","organizations_url":"https://api.github.com/users/CanalTP/orgs","repos_url":"https://api.github.com/users/CanalTP/repos","events_url":"https://api.github.com/users/CanalTP/events{/privacy}","received_events_url":"https://api.github.com/users/CanalTP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CanalTP/navitia","description":"The REST API to build cool stuff with public transport","fork":false,"url":"https://api.github.com/repos/CanalTP/navitia","forks_url":"https://api.github.com/repos/CanalTP/navitia/forks","keys_url":"https://api.github.com/repos/CanalTP/navitia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CanalTP/navitia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CanalTP/navitia/teams","hooks_url":"https://api.github.com/repos/CanalTP/navitia/hooks","issue_events_url":"https://api.github.com/repos/CanalTP/navitia/issues/events{/number}","events_url":"https://api.github.com/repos/CanalTP/navitia/events","assignees_url":"https://api.github.com/repos/CanalTP/navitia/assignees{/user}","branches_url":"https://api.github.com/repos/CanalTP/navitia/branches{/branch}","tags_url":"https://api.github.com/repos/CanalTP/navitia/tags","blobs_url":"https://api.github.com/repos/CanalTP/navitia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CanalTP/navitia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CanalTP/navitia/git/refs{/sha}","trees_url":"https://api.github.com/repos/CanalTP/navitia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CanalTP/navitia/statuses/{sha}","languages_url":"https://api.github.com/repos/CanalTP/navitia/languages","stargazers_url":"https://api.github.com/repos/CanalTP/navitia/stargazers","contributors_url":"https://api.github.com/repos/CanalTP/navitia/contributors","subscribers_url":"https://api.github.com/repos/CanalTP/navitia/subscribers","subscription_url":"https://api.github.com/repos/CanalTP/navitia/subscription","commits_url":"https://api.github.com/repos/CanalTP/navitia/commits{/sha}","git_commits_url":"https://api.github.com/repos/CanalTP/navitia/git/commits{/sha}","comments_url":"https://api.github.com/repos/CanalTP/navitia/comments{/number}","issue_comment_url":"https://api.github.com/repos/CanalTP/navitia/issues/comments{/number}","contents_url":"https://api.github.com/repos/CanalTP/navitia/contents/{+path}","compare_url":"https://api.github.com/repos/CanalTP/navitia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CanalTP/navitia/merges","archive_url":"https://api.github.com/repos/CanalTP/navitia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CanalTP/navitia/downloads","issues_url":"https://api.github.com/repos/CanalTP/navitia/issues{/number}","pulls_url":"https://api.github.com/repos/CanalTP/navitia/pulls{/number}","milestones_url":"https://api.github.com/repos/CanalTP/navitia/milestones{/number}","notifications_url":"https://api.github.com/repos/CanalTP/navitia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CanalTP/navitia/labels{/name}","releases_url":"https://api.github.com/repos/CanalTP/navitia/releases{/id}","created_at":"2013-06-19T15:34:30Z","updated_at":"2015-10-11T20:06:49Z","pushed_at":"2015-11-17T10:39:07Z","git_url":"git://github.com/CanalTP/navitia.git","ssh_url":"git@github.com:CanalTP/navitia.git","clone_url":"https://github.com/CanalTP/navitia.git","svn_url":"https://github.com/CanalTP/navitia","homepage":"http://www.navitia.io","size":36969,"stargazers_count":128,"watchers_count":128,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":14,"forks":45,"open_issues":14,"watchers":128,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/CanalTP/navitia/pulls/1265"},"html":{"href":"https://github.com/CanalTP/navitia/pull/1265"},"issue":{"href":"https://api.github.com/repos/CanalTP/navitia/issues/1265"},"comments":{"href":"https://api.github.com/repos/CanalTP/navitia/issues/1265/comments"},"review_comments":{"href":"https://api.github.com/repos/CanalTP/navitia/pulls/1265/comments"},"review_comment":{"href":"https://api.github.com/repos/CanalTP/navitia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CanalTP/navitia/pulls/1265/commits"},"statuses":{"href":"https://api.github.com/repos/CanalTP/navitia/statuses/60faea8f99c7572eb04941f60f25de792d7aaf03"}}}}