{"action":"created","issue":{"url":"https://api.github.com/repos/allegro/ralph/issues/2078","labels_url":"https://api.github.com/repos/allegro/ralph/issues/2078/labels{/name}","comments_url":"https://api.github.com/repos/allegro/ralph/issues/2078/comments","events_url":"https://api.github.com/repos/allegro/ralph/issues/2078/events","html_url":"https://github.com/allegro/ralph/pull/2078","id":121215950,"number":2078,"title":"Transition history import bugfix","user":{"login":"szok","id":2209581,"avatar_url":"https://avatars.githubusercontent.com/u/2209581?v=3","gravatar_id":"","url":"https://api.github.com/users/szok","html_url":"https://github.com/szok","followers_url":"https://api.github.com/users/szok/followers","following_url":"https://api.github.com/users/szok/following{/other_user}","gists_url":"https://api.github.com/users/szok/gists{/gist_id}","starred_url":"https://api.github.com/users/szok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szok/subscriptions","organizations_url":"https://api.github.com/users/szok/orgs","repos_url":"https://api.github.com/users/szok/repos","events_url":"https://api.github.com/users/szok/events{/privacy}","received_events_url":"https://api.github.com/users/szok/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/allegro/ralph/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/allegro/ralph/labels/in%20progress","name":"in progress","color":"0052cc"},{"url":"https://api.github.com/repos/allegro/ralph/labels/ng","name":"ng","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-09T11:27:29Z","updated_at":"2015-12-09T14:12:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/allegro/ralph/pulls/2078","html_url":"https://github.com/allegro/ralph/pull/2078","diff_url":"https://github.com/allegro/ralph/pull/2078.diff","patch_url":"https://github.com/allegro/ralph/pull/2078.patch"},"body":"Before starting to re-import code to be run:\r\n\r\n```\r\nfor i in ImportedObjects.objects.filter(content_type=ContentType.objects.get_for_model(TransitionsHistory)).exclude(old_object_pk__icontains='|'):\r\n    history = TransitionsHistory.objects.get(pk=i.object_pk)\r\n    print(history.object_id, history.content_type)\r\n    asset = history.content_type.model_class().objects.get(pk=history.object_id)\r\n    old_asset_id = ImportedObjects.get_imported_id(asset)\r\n    i.old_object_pk = '{}|{}'.format(i.old_object_pk, old_asset_id)\r\n    i.save()\r\n```"},"comment":{"url":"https://api.github.com/repos/allegro/ralph/issues/comments/163248873","html_url":"https://github.com/allegro/ralph/pull/2078#issuecomment-163248873","issue_url":"https://api.github.com/repos/allegro/ralph/issues/2078","id":163248873,"user":{"login":"ar4s","id":351535,"avatar_url":"https://avatars.githubusercontent.com/u/351535?v=3","gravatar_id":"","url":"https://api.github.com/users/ar4s","html_url":"https://github.com/ar4s","followers_url":"https://api.github.com/users/ar4s/followers","following_url":"https://api.github.com/users/ar4s/following{/other_user}","gists_url":"https://api.github.com/users/ar4s/gists{/gist_id}","starred_url":"https://api.github.com/users/ar4s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ar4s/subscriptions","organizations_url":"https://api.github.com/users/ar4s/orgs","repos_url":"https://api.github.com/users/ar4s/repos","events_url":"https://api.github.com/users/ar4s/events{/privacy}","received_events_url":"https://api.github.com/users/ar4s/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T14:12:15Z","updated_at":"2015-12-09T14:12:15Z","body":":ok:"}}