{"action":"created","comment":{"url":"https://api.github.com/repos/ten24/slatwall/pulls/comments/48994600","id":48994600,"diff_hunk":"@@ -1018,6 +1018,13 @@ component displayname=\"Product\" entityname=\"SlatwallProduct\" table=\"SwProduct\" p\n \n \t// Skus (one-to-many)\n \tpublic void function addSku(required any sku) {\n+\t\t//if sku code is null then create one automatically\n+\t\tif(isNull(arguments.sku.getSkuCode())){\n+\t\t\tvar skusCount = this.getSkusCount();\n+\t\t\tvar skuCode = this.getProductCode() & \"-#skusCount + 1#\";\n+\t\t\targuments.sku.setSkuCode(skuCode);\n+\t\t}\n+\t\t","path":"model/entity/Product.cfc","position":10,"original_position":10,"commit_id":"394523fe1637fbe016c8d0f5ca6a434de340b03c","original_commit_id":"394523fe1637fbe016c8d0f5ca6a434de340b03c","user":{"login":"rmarchandTen24","id":7649963,"avatar_url":"https://avatars.githubusercontent.com/u/7649963?v=3","gravatar_id":"","url":"https://api.github.com/users/rmarchandTen24","html_url":"https://github.com/rmarchandTen24","followers_url":"https://api.github.com/users/rmarchandTen24/followers","following_url":"https://api.github.com/users/rmarchandTen24/following{/other_user}","gists_url":"https://api.github.com/users/rmarchandTen24/gists{/gist_id}","starred_url":"https://api.github.com/users/rmarchandTen24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmarchandTen24/subscriptions","organizations_url":"https://api.github.com/users/rmarchandTen24/orgs","repos_url":"https://api.github.com/users/rmarchandTen24/repos","events_url":"https://api.github.com/users/rmarchandTen24/events{/privacy}","received_events_url":"https://api.github.com/users/rmarchandTen24/received_events","type":"User","site_admin":false},"body":"https://github.com/ten24/slatwall/pull/3938\n\nOn Wed, Jan 6, 2016 at 1:32 PM, Greg Moser <notifications@github.com> wrote:\n\n> In model/entity/Product.cfc\n> <https://github.com/ten24/slatwall/pull/3936#discussion_r48991051>:\n>\n> > @@ -1018,6 +1018,13 @@ component displayname=\"Product\" entityname=\"SlatwallProduct\" table=\"SwProduct\" p\n> >\n> >  \t// Skus (one-to-many)\n> >  \tpublic void function addSku(required any sku) {\n> > +\t\t//if sku code is null then create one automatically\n> > +\t\tif(isNull(arguments.sku.getSkuCode())){\n> > +\t\t\tvar skusCount = this.getSkusCount();\n> > +\t\t\tvar skuCode = this.getProductCode() & \"-#skusCount + 1#\";\n> > +\t\t\targuments.sku.setSkuCode(skuCode);\n> > +\t\t}\n> > +\t\t\n>\n> Also this doesn't work when you delete a sku. Consider this:\n>\n> ASDF-1\n> ASDF-2\n> ASDF-3\n> ASDF-4\n> ASDF-5\n>\n> Then delete ASDF-3\n>\n> ASDF-1\n> ASDF-2\n> ASDF-4\n> ASDF-5\n>\n> Now add a new one...\n>\n> Your logic would make it ASDF-5... but that already exists.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/ten24/slatwall/pull/3936/files#r48991051>.\n>\n","created_at":"2016-01-06T19:01:21Z","updated_at":"2016-01-06T19:01:21Z","html_url":"https://github.com/ten24/slatwall/pull/3936#discussion_r48994600","pull_request_url":"https://api.github.com/repos/ten24/slatwall/pulls/3936","_links":{"self":{"href":"https://api.github.com/repos/ten24/slatwall/pulls/comments/48994600"},"html":{"href":"https://github.com/ten24/slatwall/pull/3936#discussion_r48994600"},"pull_request":{"href":"https://api.github.com/repos/ten24/slatwall/pulls/3936"}}},"pull_request":{"url":"https://api.github.com/repos/ten24/slatwall/pulls/3936","id":55225998,"html_url":"https://github.com/ten24/slatwall/pull/3936","diff_url":"https://github.com/ten24/slatwall/pull/3936.diff","patch_url":"https://github.com/ten24/slatwall/pull/3936.patch","issue_url":"https://api.github.com/repos/ten24/slatwall/issues/3936","number":3936,"state":"closed","locked":false,"title":"when adding a sku set the skucode to the product Code + skucount if a","user":{"login":"rmarchandTen24","id":7649963,"avatar_url":"https://avatars.githubusercontent.com/u/7649963?v=3","gravatar_id":"","url":"https://api.github.com/users/rmarchandTen24","html_url":"https://github.com/rmarchandTen24","followers_url":"https://api.github.com/users/rmarchandTen24/followers","following_url":"https://api.github.com/users/rmarchandTen24/following{/other_user}","gists_url":"https://api.github.com/users/rmarchandTen24/gists{/gist_id}","starred_url":"https://api.github.com/users/rmarchandTen24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmarchandTen24/subscriptions","organizations_url":"https://api.github.com/users/rmarchandTen24/orgs","repos_url":"https://api.github.com/users/rmarchandTen24/repos","events_url":"https://api.github.com/users/rmarchandTen24/events{/privacy}","received_events_url":"https://api.github.com/users/rmarchandTen24/received_events","type":"User","site_admin":false},"body":"sku code isn't provided","created_at":"2016-01-06T15:38:42Z","updated_at":"2016-01-06T19:01:21Z","closed_at":"2016-01-06T15:38:51Z","merged_at":"2016-01-06T15:38:51Z","merge_commit_sha":"b207def4d870ac755eb3d9773acd7209fc87f86d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ten24/slatwall/pulls/3936/commits","review_comments_url":"https://api.github.com/repos/ten24/slatwall/pulls/3936/comments","review_comment_url":"https://api.github.com/repos/ten24/slatwall/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ten24/slatwall/issues/3936/comments","statuses_url":"https://api.github.com/repos/ten24/slatwall/statuses/394523fe1637fbe016c8d0f5ca6a434de340b03c","head":{"label":"ten24:feature-rm-modulebugfixes","ref":"feature-rm-modulebugfixes","sha":"394523fe1637fbe016c8d0f5ca6a434de340b03c","user":{"login":"ten24","id":615272,"avatar_url":"https://avatars.githubusercontent.com/u/615272?v=3","gravatar_id":"","url":"https://api.github.com/users/ten24","html_url":"https://github.com/ten24","followers_url":"https://api.github.com/users/ten24/followers","following_url":"https://api.github.com/users/ten24/following{/other_user}","gists_url":"https://api.github.com/users/ten24/gists{/gist_id}","starred_url":"https://api.github.com/users/ten24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ten24/subscriptions","organizations_url":"https://api.github.com/users/ten24/orgs","repos_url":"https://api.github.com/users/ten24/repos","events_url":"https://api.github.com/users/ten24/events{/privacy}","received_events_url":"https://api.github.com/users/ten24/received_events","type":"Organization","site_admin":false},"repo":{"id":1483572,"name":"slatwall","full_name":"ten24/slatwall","owner":{"login":"ten24","id":615272,"avatar_url":"https://avatars.githubusercontent.com/u/615272?v=3","gravatar_id":"","url":"https://api.github.com/users/ten24","html_url":"https://github.com/ten24","followers_url":"https://api.github.com/users/ten24/followers","following_url":"https://api.github.com/users/ten24/following{/other_user}","gists_url":"https://api.github.com/users/ten24/gists{/gist_id}","starred_url":"https://api.github.com/users/ten24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ten24/subscriptions","organizations_url":"https://api.github.com/users/ten24/orgs","repos_url":"https://api.github.com/users/ten24/repos","events_url":"https://api.github.com/users/ten24/events{/privacy}","received_events_url":"https://api.github.com/users/ten24/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ten24/slatwall","description":"Slatwall - An Open Source Commerce Platform","fork":false,"url":"https://api.github.com/repos/ten24/slatwall","forks_url":"https://api.github.com/repos/ten24/slatwall/forks","keys_url":"https://api.github.com/repos/ten24/slatwall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ten24/slatwall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ten24/slatwall/teams","hooks_url":"https://api.github.com/repos/ten24/slatwall/hooks","issue_events_url":"https://api.github.com/repos/ten24/slatwall/issues/events{/number}","events_url":"https://api.github.com/repos/ten24/slatwall/events","assignees_url":"https://api.github.com/repos/ten24/slatwall/assignees{/user}","branches_url":"https://api.github.com/repos/ten24/slatwall/branches{/branch}","tags_url":"https://api.github.com/repos/ten24/slatwall/tags","blobs_url":"https://api.github.com/repos/ten24/slatwall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ten24/slatwall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ten24/slatwall/git/refs{/sha}","trees_url":"https://api.github.com/repos/ten24/slatwall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ten24/slatwall/statuses/{sha}","languages_url":"https://api.github.com/repos/ten24/slatwall/languages","stargazers_url":"https://api.github.com/repos/ten24/slatwall/stargazers","contributors_url":"https://api.github.com/repos/ten24/slatwall/contributors","subscribers_url":"https://api.github.com/repos/ten24/slatwall/subscribers","subscription_url":"https://api.github.com/repos/ten24/slatwall/subscription","commits_url":"https://api.github.com/repos/ten24/slatwall/commits{/sha}","git_commits_url":"https://api.github.com/repos/ten24/slatwall/git/commits{/sha}","comments_url":"https://api.github.com/repos/ten24/slatwall/comments{/number}","issue_comment_url":"https://api.github.com/repos/ten24/slatwall/issues/comments{/number}","contents_url":"https://api.github.com/repos/ten24/slatwall/contents/{+path}","compare_url":"https://api.github.com/repos/ten24/slatwall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ten24/slatwall/merges","archive_url":"https://api.github.com/repos/ten24/slatwall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ten24/slatwall/downloads","issues_url":"https://api.github.com/repos/ten24/slatwall/issues{/number}","pulls_url":"https://api.github.com/repos/ten24/slatwall/pulls{/number}","milestones_url":"https://api.github.com/repos/ten24/slatwall/milestones{/number}","notifications_url":"https://api.github.com/repos/ten24/slatwall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ten24/slatwall/labels{/name}","releases_url":"https://api.github.com/repos/ten24/slatwall/releases{/id}","created_at":"2011-03-15T16:58:28Z","updated_at":"2015-11-19T20:46:54Z","pushed_at":"2016-01-06T19:00:46Z","git_url":"git://github.com/ten24/slatwall.git","ssh_url":"git@github.com:ten24/slatwall.git","clone_url":"https://github.com/ten24/slatwall.git","svn_url":"https://github.com/ten24/slatwall","homepage":"http://www.slatwallcommerce.com","size":122860,"stargazers_count":94,"watchers_count":94,"language":"ColdFusion","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":281,"forks":63,"open_issues":281,"watchers":94,"default_branch":"master"}},"base":{"label":"ten24:feature","ref":"feature","sha":"365d5a03c65f1b85b429788df998bae5a70eb6cc","user":{"login":"ten24","id":615272,"avatar_url":"https://avatars.githubusercontent.com/u/615272?v=3","gravatar_id":"","url":"https://api.github.com/users/ten24","html_url":"https://github.com/ten24","followers_url":"https://api.github.com/users/ten24/followers","following_url":"https://api.github.com/users/ten24/following{/other_user}","gists_url":"https://api.github.com/users/ten24/gists{/gist_id}","starred_url":"https://api.github.com/users/ten24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ten24/subscriptions","organizations_url":"https://api.github.com/users/ten24/orgs","repos_url":"https://api.github.com/users/ten24/repos","events_url":"https://api.github.com/users/ten24/events{/privacy}","received_events_url":"https://api.github.com/users/ten24/received_events","type":"Organization","site_admin":false},"repo":{"id":1483572,"name":"slatwall","full_name":"ten24/slatwall","owner":{"login":"ten24","id":615272,"avatar_url":"https://avatars.githubusercontent.com/u/615272?v=3","gravatar_id":"","url":"https://api.github.com/users/ten24","html_url":"https://github.com/ten24","followers_url":"https://api.github.com/users/ten24/followers","following_url":"https://api.github.com/users/ten24/following{/other_user}","gists_url":"https://api.github.com/users/ten24/gists{/gist_id}","starred_url":"https://api.github.com/users/ten24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ten24/subscriptions","organizations_url":"https://api.github.com/users/ten24/orgs","repos_url":"https://api.github.com/users/ten24/repos","events_url":"https://api.github.com/users/ten24/events{/privacy}","received_events_url":"https://api.github.com/users/ten24/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ten24/slatwall","description":"Slatwall - An Open Source Commerce Platform","fork":false,"url":"https://api.github.com/repos/ten24/slatwall","forks_url":"https://api.github.com/repos/ten24/slatwall/forks","keys_url":"https://api.github.com/repos/ten24/slatwall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ten24/slatwall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ten24/slatwall/teams","hooks_url":"https://api.github.com/repos/ten24/slatwall/hooks","issue_events_url":"https://api.github.com/repos/ten24/slatwall/issues/events{/number}","events_url":"https://api.github.com/repos/ten24/slatwall/events","assignees_url":"https://api.github.com/repos/ten24/slatwall/assignees{/user}","branches_url":"https://api.github.com/repos/ten24/slatwall/branches{/branch}","tags_url":"https://api.github.com/repos/ten24/slatwall/tags","blobs_url":"https://api.github.com/repos/ten24/slatwall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ten24/slatwall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ten24/slatwall/git/refs{/sha}","trees_url":"https://api.github.com/repos/ten24/slatwall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ten24/slatwall/statuses/{sha}","languages_url":"https://api.github.com/repos/ten24/slatwall/languages","stargazers_url":"https://api.github.com/repos/ten24/slatwall/stargazers","contributors_url":"https://api.github.com/repos/ten24/slatwall/contributors","subscribers_url":"https://api.github.com/repos/ten24/slatwall/subscribers","subscription_url":"https://api.github.com/repos/ten24/slatwall/subscription","commits_url":"https://api.github.com/repos/ten24/slatwall/commits{/sha}","git_commits_url":"https://api.github.com/repos/ten24/slatwall/git/commits{/sha}","comments_url":"https://api.github.com/repos/ten24/slatwall/comments{/number}","issue_comment_url":"https://api.github.com/repos/ten24/slatwall/issues/comments{/number}","contents_url":"https://api.github.com/repos/ten24/slatwall/contents/{+path}","compare_url":"https://api.github.com/repos/ten24/slatwall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ten24/slatwall/merges","archive_url":"https://api.github.com/repos/ten24/slatwall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ten24/slatwall/downloads","issues_url":"https://api.github.com/repos/ten24/slatwall/issues{/number}","pulls_url":"https://api.github.com/repos/ten24/slatwall/pulls{/number}","milestones_url":"https://api.github.com/repos/ten24/slatwall/milestones{/number}","notifications_url":"https://api.github.com/repos/ten24/slatwall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ten24/slatwall/labels{/name}","releases_url":"https://api.github.com/repos/ten24/slatwall/releases{/id}","created_at":"2011-03-15T16:58:28Z","updated_at":"2015-11-19T20:46:54Z","pushed_at":"2016-01-06T19:00:46Z","git_url":"git://github.com/ten24/slatwall.git","ssh_url":"git@github.com:ten24/slatwall.git","clone_url":"https://github.com/ten24/slatwall.git","svn_url":"https://github.com/ten24/slatwall","homepage":"http://www.slatwallcommerce.com","size":122860,"stargazers_count":94,"watchers_count":94,"language":"ColdFusion","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":281,"forks":63,"open_issues":281,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ten24/slatwall/pulls/3936"},"html":{"href":"https://github.com/ten24/slatwall/pull/3936"},"issue":{"href":"https://api.github.com/repos/ten24/slatwall/issues/3936"},"comments":{"href":"https://api.github.com/repos/ten24/slatwall/issues/3936/comments"},"review_comments":{"href":"https://api.github.com/repos/ten24/slatwall/pulls/3936/comments"},"review_comment":{"href":"https://api.github.com/repos/ten24/slatwall/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ten24/slatwall/pulls/3936/commits"},"statuses":{"href":"https://api.github.com/repos/ten24/slatwall/statuses/394523fe1637fbe016c8d0f5ca6a434de340b03c"}}}}