{"action":"created","comment":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/34849842","id":34849842,"diff_hunk":"@@ -33,6 +33,7 @@ SphereEntityItem::SphereEntityItem(const EntityItemID& entityItemID, const Entit\n         EntityItem(entityItemID, properties) \n { \n     _type = EntityTypes::Sphere;\n+    _created = properties.getCreated();\n     setProperties(properties);\n     _volumeMultiplier *= PI / 6.0f;\n }","path":"libraries/entities/src/SphereEntityItem.cpp","position":7,"original_position":7,"commit_id":"def0d51b2c7ec36bb7e3139cc34f719cc225deef","original_commit_id":"def0d51b2c7ec36bb7e3139cc34f719cc225deef","user":{"login":"AndrewMeadows","id":2186405,"avatar_url":"https://avatars.githubusercontent.com/u/2186405?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewMeadows","html_url":"https://github.com/AndrewMeadows","followers_url":"https://api.github.com/users/AndrewMeadows/followers","following_url":"https://api.github.com/users/AndrewMeadows/following{/other_user}","gists_url":"https://api.github.com/users/AndrewMeadows/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewMeadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewMeadows/subscriptions","organizations_url":"https://api.github.com/users/AndrewMeadows/orgs","repos_url":"https://api.github.com/users/AndrewMeadows/repos","events_url":"https://api.github.com/users/AndrewMeadows/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewMeadows/received_events","type":"User","site_admin":false},"body":"Something is messed up here. In particular:\r\n\r\n(1) EntityItem::setProperties() should set the **_created** field no problem.\r\n\r\n(2) I can't see the connection between **_created** and **_dimensions** (bad dimensions are the symptom of the bug).\r\n\r\n(3) It appears that the **setProperties()** call at line 37 is redundant -- it is also called inside the EntityItem() CTOR at line 33.  I think this is because in the context of EntityItem's CTOR the entity doesn't yet know it is a sphere and so it only reads the base properties and we call it again inside the SphereEntityItem CTOR to pick up sphere-specific properties.  Needless to say this anti-pattern probably has a name in the cabinet of wonders.\r\n\r\n(4) Even if this line fixes something, a quick audit shows that there are a few other entity subclasses that would have the same problem.\r\n\r\n(\r\n\r\n(2) Many of our FooEntityItem subclasses suffer from this same mysterious ","created_at":"2015-07-16T23:32:37Z","updated_at":"2015-07-16T23:32:37Z","html_url":"https://github.com/highfidelity/hifi/pull/5350#discussion_r34849842","pull_request_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5350","_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/34849842"},"html":{"href":"https://github.com/highfidelity/hifi/pull/5350#discussion_r34849842"},"pull_request":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5350"}}},"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/5350","id":40185394,"html_url":"https://github.com/highfidelity/hifi/pull/5350","diff_url":"https://github.com/highfidelity/hifi/pull/5350.diff","patch_url":"https://github.com/highfidelity/hifi/pull/5350.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/5350","number":5350,"state":"open","locked":false,"title":"Set creation stamp for spheres. ","user":{"login":"howard-stearns","id":7015115,"avatar_url":"https://avatars.githubusercontent.com/u/7015115?v=3","gravatar_id":"","url":"https://api.github.com/users/howard-stearns","html_url":"https://github.com/howard-stearns","followers_url":"https://api.github.com/users/howard-stearns/followers","following_url":"https://api.github.com/users/howard-stearns/following{/other_user}","gists_url":"https://api.github.com/users/howard-stearns/gists{/gist_id}","starred_url":"https://api.github.com/users/howard-stearns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howard-stearns/subscriptions","organizations_url":"https://api.github.com/users/howard-stearns/orgs","repos_url":"https://api.github.com/users/howard-stearns/repos","events_url":"https://api.github.com/users/howard-stearns/events{/privacy}","received_events_url":"https://api.github.com/users/howard-stearns/received_events","type":"User","site_admin":false},"body":"(All other entities were already doing this.)\r\n\r\nWithout this, creating a sphere on the fly (e.g., in a script) would have it ignore non-default (e.g., dimension) property values.","created_at":"2015-07-16T22:59:54Z","updated_at":"2015-07-16T23:32:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bd77891c92e147b476554252bc7d02c9e6e41f0","assignee":{"login":"AndrewMeadows","id":2186405,"avatar_url":"https://avatars.githubusercontent.com/u/2186405?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewMeadows","html_url":"https://github.com/AndrewMeadows","followers_url":"https://api.github.com/users/AndrewMeadows/followers","following_url":"https://api.github.com/users/AndrewMeadows/following{/other_user}","gists_url":"https://api.github.com/users/AndrewMeadows/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewMeadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewMeadows/subscriptions","organizations_url":"https://api.github.com/users/AndrewMeadows/orgs","repos_url":"https://api.github.com/users/AndrewMeadows/repos","events_url":"https://api.github.com/users/AndrewMeadows/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewMeadows/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5350/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5350/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/5350/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/def0d51b2c7ec36bb7e3139cc34f719cc225deef","head":{"label":"howard-stearns:sphere-script-dimensions","ref":"sphere-script-dimensions","sha":"def0d51b2c7ec36bb7e3139cc34f719cc225deef","user":{"login":"howard-stearns","id":7015115,"avatar_url":"https://avatars.githubusercontent.com/u/7015115?v=3","gravatar_id":"","url":"https://api.github.com/users/howard-stearns","html_url":"https://github.com/howard-stearns","followers_url":"https://api.github.com/users/howard-stearns/followers","following_url":"https://api.github.com/users/howard-stearns/following{/other_user}","gists_url":"https://api.github.com/users/howard-stearns/gists{/gist_id}","starred_url":"https://api.github.com/users/howard-stearns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howard-stearns/subscriptions","organizations_url":"https://api.github.com/users/howard-stearns/orgs","repos_url":"https://api.github.com/users/howard-stearns/repos","events_url":"https://api.github.com/users/howard-stearns/events{/privacy}","received_events_url":"https://api.github.com/users/howard-stearns/received_events","type":"User","site_admin":false},"repo":{"id":34746667,"name":"hifi","full_name":"howard-stearns/hifi","owner":{"login":"howard-stearns","id":7015115,"avatar_url":"https://avatars.githubusercontent.com/u/7015115?v=3","gravatar_id":"","url":"https://api.github.com/users/howard-stearns","html_url":"https://github.com/howard-stearns","followers_url":"https://api.github.com/users/howard-stearns/followers","following_url":"https://api.github.com/users/howard-stearns/following{/other_user}","gists_url":"https://api.github.com/users/howard-stearns/gists{/gist_id}","starred_url":"https://api.github.com/users/howard-stearns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howard-stearns/subscriptions","organizations_url":"https://api.github.com/users/howard-stearns/orgs","repos_url":"https://api.github.com/users/howard-stearns/repos","events_url":"https://api.github.com/users/howard-stearns/events{/privacy}","received_events_url":"https://api.github.com/users/howard-stearns/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/howard-stearns/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":true,"url":"https://api.github.com/repos/howard-stearns/hifi","forks_url":"https://api.github.com/repos/howard-stearns/hifi/forks","keys_url":"https://api.github.com/repos/howard-stearns/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/howard-stearns/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/howard-stearns/hifi/teams","hooks_url":"https://api.github.com/repos/howard-stearns/hifi/hooks","issue_events_url":"https://api.github.com/repos/howard-stearns/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/howard-stearns/hifi/events","assignees_url":"https://api.github.com/repos/howard-stearns/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/howard-stearns/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/howard-stearns/hifi/tags","blobs_url":"https://api.github.com/repos/howard-stearns/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/howard-stearns/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/howard-stearns/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/howard-stearns/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/howard-stearns/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/howard-stearns/hifi/languages","stargazers_url":"https://api.github.com/repos/howard-stearns/hifi/stargazers","contributors_url":"https://api.github.com/repos/howard-stearns/hifi/contributors","subscribers_url":"https://api.github.com/repos/howard-stearns/hifi/subscribers","subscription_url":"https://api.github.com/repos/howard-stearns/hifi/subscription","commits_url":"https://api.github.com/repos/howard-stearns/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/howard-stearns/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/howard-stearns/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/howard-stearns/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/howard-stearns/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/howard-stearns/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/howard-stearns/hifi/merges","archive_url":"https://api.github.com/repos/howard-stearns/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/howard-stearns/hifi/downloads","issues_url":"https://api.github.com/repos/howard-stearns/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/howard-stearns/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/howard-stearns/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/howard-stearns/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/howard-stearns/hifi/labels{/name}","releases_url":"https://api.github.com/repos/howard-stearns/hifi/releases{/id}","created_at":"2015-04-28T17:54:06Z","updated_at":"2015-04-29T18:26:52Z","pushed_at":"2015-07-16T22:58:20Z","git_url":"git://github.com/howard-stearns/hifi.git","ssh_url":"git@github.com:howard-stearns/hifi.git","clone_url":"https://github.com/howard-stearns/hifi.git","svn_url":"https://github.com/howard-stearns/hifi","homepage":"","size":161904,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"highfidelity:master","ref":"master","sha":"62fca613a6cc5ff67a4bf6d8383b654ab90b7334","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","created_at":"2012-08-10T18:26:22Z","updated_at":"2015-07-14T07:31:45Z","pushed_at":"2015-07-16T23:28:19Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"","size":220942,"stargazers_count":285,"watchers_count":285,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":162,"mirror_url":null,"open_issues_count":59,"forks":162,"open_issues":59,"watchers":285,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5350"},"html":{"href":"https://github.com/highfidelity/hifi/pull/5350"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/5350"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/5350/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5350/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5350/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/def0d51b2c7ec36bb7e3139cc34f719cc225deef"}}}}