{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/45552039","id":45552039,"diff_hunk":"@@ -56,6 +57,29 @@ def map(exploration_model):\n     def reduce(exp_id, list_of_exps):\n         pass\n \n+class ExplorationFirstPublishedOneOffJob(jobs.BaseMapReduceJobManager):\n+    \"\"\"One-off job that finds first published datetime for all explorations.\"\"\"\n+\n+    @classmethod\n+    def entity_classes_to_map_over(cls):\n+        return [exp_models.ExplorationRightsSnapshotContentModel]\n+\n+    @staticmethod\n+    def map(item):\n+        if item.content['status'] == rights_manager.ACTIVITY_STATUS_PUBLIC:\n+            snapshot_id = item.id\n+            yield(snapshot_id[:snapshot_id.rfind(\"-\")], utils.get_time_in_millisecs(","path":"core/domain/exp_jobs_one_off.py","position":23,"original_position":23,"commit_id":"de0babe208bdd8542d398863711c8f5498c8a105","original_commit_id":"de0babe208bdd8542d398863711c8f5498c8a105","user":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"body":"nit: add space after 'yield'\r\n\r\nProbably better to format as follows:\r\n\r\n```\r\n    yield (\r\n        snapshot_id[:snapshot_id.rfind(\"-\")],\r\n        utils.get_time_in_millisecs(item.created_on))\r\n```\r\n\r\n","created_at":"2015-11-21T22:53:25Z","updated_at":"2015-11-21T22:53:25Z","html_url":"https://github.com/oppia/oppia/pull/1153#discussion_r45552039","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/1153","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/45552039"},"html":{"href":"https://github.com/oppia/oppia/pull/1153#discussion_r45552039"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1153"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/1153","id":51332406,"html_url":"https://github.com/oppia/oppia/pull/1153","diff_url":"https://github.com/oppia/oppia/pull/1153.diff","patch_url":"https://github.com/oppia/oppia/pull/1153.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/1153","number":1153,"state":"open","locked":false,"title":"Created one-off job to store first published datetime for existing ex…","user":{"login":"kerryxwang","id":14992169,"avatar_url":"https://avatars.githubusercontent.com/u/14992169?v=3","gravatar_id":"","url":"https://api.github.com/users/kerryxwang","html_url":"https://github.com/kerryxwang","followers_url":"https://api.github.com/users/kerryxwang/followers","following_url":"https://api.github.com/users/kerryxwang/following{/other_user}","gists_url":"https://api.github.com/users/kerryxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/kerryxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerryxwang/subscriptions","organizations_url":"https://api.github.com/users/kerryxwang/orgs","repos_url":"https://api.github.com/users/kerryxwang/repos","events_url":"https://api.github.com/users/kerryxwang/events{/privacy}","received_events_url":"https://api.github.com/users/kerryxwang/received_events","type":"User","site_admin":false},"body":"…ploration. Added attribute first_published to exploration activity_rights.","created_at":"2015-11-20T09:07:46Z","updated_at":"2015-11-21T22:53:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e5cf850d5fc38ab000fd31bde794ffb489db882","assignee":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/1153/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/1153/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/1153/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/de0babe208bdd8542d398863711c8f5498c8a105","head":{"label":"kerryxwang:exploration-created-datetime","ref":"exploration-created-datetime","sha":"de0babe208bdd8542d398863711c8f5498c8a105","user":{"login":"kerryxwang","id":14992169,"avatar_url":"https://avatars.githubusercontent.com/u/14992169?v=3","gravatar_id":"","url":"https://api.github.com/users/kerryxwang","html_url":"https://github.com/kerryxwang","followers_url":"https://api.github.com/users/kerryxwang/followers","following_url":"https://api.github.com/users/kerryxwang/following{/other_user}","gists_url":"https://api.github.com/users/kerryxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/kerryxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerryxwang/subscriptions","organizations_url":"https://api.github.com/users/kerryxwang/orgs","repos_url":"https://api.github.com/users/kerryxwang/repos","events_url":"https://api.github.com/users/kerryxwang/events{/privacy}","received_events_url":"https://api.github.com/users/kerryxwang/received_events","type":"User","site_admin":false},"repo":{"id":43977306,"name":"oppia","full_name":"kerryxwang/oppia","owner":{"login":"kerryxwang","id":14992169,"avatar_url":"https://avatars.githubusercontent.com/u/14992169?v=3","gravatar_id":"","url":"https://api.github.com/users/kerryxwang","html_url":"https://github.com/kerryxwang","followers_url":"https://api.github.com/users/kerryxwang/followers","following_url":"https://api.github.com/users/kerryxwang/following{/other_user}","gists_url":"https://api.github.com/users/kerryxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/kerryxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerryxwang/subscriptions","organizations_url":"https://api.github.com/users/kerryxwang/orgs","repos_url":"https://api.github.com/users/kerryxwang/repos","events_url":"https://api.github.com/users/kerryxwang/events{/privacy}","received_events_url":"https://api.github.com/users/kerryxwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kerryxwang/oppia","description":"Tool for collaboratively building interactive tutors.","fork":true,"url":"https://api.github.com/repos/kerryxwang/oppia","forks_url":"https://api.github.com/repos/kerryxwang/oppia/forks","keys_url":"https://api.github.com/repos/kerryxwang/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kerryxwang/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kerryxwang/oppia/teams","hooks_url":"https://api.github.com/repos/kerryxwang/oppia/hooks","issue_events_url":"https://api.github.com/repos/kerryxwang/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/kerryxwang/oppia/events","assignees_url":"https://api.github.com/repos/kerryxwang/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/kerryxwang/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/kerryxwang/oppia/tags","blobs_url":"https://api.github.com/repos/kerryxwang/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kerryxwang/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kerryxwang/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/kerryxwang/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kerryxwang/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/kerryxwang/oppia/languages","stargazers_url":"https://api.github.com/repos/kerryxwang/oppia/stargazers","contributors_url":"https://api.github.com/repos/kerryxwang/oppia/contributors","subscribers_url":"https://api.github.com/repos/kerryxwang/oppia/subscribers","subscription_url":"https://api.github.com/repos/kerryxwang/oppia/subscription","commits_url":"https://api.github.com/repos/kerryxwang/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/kerryxwang/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/kerryxwang/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/kerryxwang/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/kerryxwang/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/kerryxwang/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kerryxwang/oppia/merges","archive_url":"https://api.github.com/repos/kerryxwang/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kerryxwang/oppia/downloads","issues_url":"https://api.github.com/repos/kerryxwang/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/kerryxwang/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/kerryxwang/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/kerryxwang/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kerryxwang/oppia/labels{/name}","releases_url":"https://api.github.com/repos/kerryxwang/oppia/releases{/id}","created_at":"2015-10-09T19:59:29Z","updated_at":"2015-10-09T19:59:35Z","pushed_at":"2015-11-21T21:58:41Z","git_url":"git://github.com/kerryxwang/oppia.git","ssh_url":"git@github.com:kerryxwang/oppia.git","clone_url":"https://github.com/kerryxwang/oppia.git","svn_url":"https://github.com/kerryxwang/oppia","homepage":"https://www.oppia.org","size":38228,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"28528c04479badd573e6e55b6e9ebc97b25bc2be","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive tutors.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","created_at":"2015-08-14T00:16:14Z","updated_at":"2015-11-20T13:29:21Z","pushed_at":"2015-11-21T21:58:41Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":43514,"stargazers_count":57,"watchers_count":57,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":222,"forks":72,"open_issues":222,"watchers":57,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1153"},"html":{"href":"https://github.com/oppia/oppia/pull/1153"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/1153"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/1153/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1153/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1153/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/de0babe208bdd8542d398863711c8f5498c8a105"}}}}