{"action":"created","comment":{"url":"https://api.github.com/repos/solidusio/solidus/pulls/comments/47905135","id":47905135,"diff_hunk":"@@ -100,6 +104,18 @@ def close(closed_by)\n \n     private\n \n+    def ensure_transfer_items_valid","path":"core/app/models/spree/stock_transfer.rb","position":40,"original_position":40,"commit_id":"614f68cd45d175f90152020c05427fb50c3a0972","original_commit_id":"614f68cd45d175f90152020c05427fb50c3a0972","user":{"login":"gmacdougall","id":764390,"avatar_url":"https://avatars.githubusercontent.com/u/764390?v=3","gravatar_id":"","url":"https://api.github.com/users/gmacdougall","html_url":"https://github.com/gmacdougall","followers_url":"https://api.github.com/users/gmacdougall/followers","following_url":"https://api.github.com/users/gmacdougall/following{/other_user}","gists_url":"https://api.github.com/users/gmacdougall/gists{/gist_id}","starred_url":"https://api.github.com/users/gmacdougall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmacdougall/subscriptions","organizations_url":"https://api.github.com/users/gmacdougall/orgs","repos_url":"https://api.github.com/users/gmacdougall/repos","events_url":"https://api.github.com/users/gmacdougall/events{/privacy}","received_events_url":"https://api.github.com/users/gmacdougall/received_events","type":"User","site_admin":false},"body":"This does return true/false, so I think a name like: `transfer_items_valid?` would be better.","created_at":"2015-12-17T13:33:59Z","updated_at":"2015-12-17T13:33:59Z","html_url":"https://github.com/solidusio/solidus/pull/594#discussion_r47905135","pull_request_url":"https://api.github.com/repos/solidusio/solidus/pulls/594","_links":{"self":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/comments/47905135"},"html":{"href":"https://github.com/solidusio/solidus/pull/594#discussion_r47905135"},"pull_request":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/594"}}},"pull_request":{"url":"https://api.github.com/repos/solidusio/solidus/pulls/594","id":53937348,"html_url":"https://github.com/solidusio/solidus/pull/594","diff_url":"https://github.com/solidusio/solidus/pull/594.diff","patch_url":"https://github.com/solidusio/solidus/pull/594.patch","issue_url":"https://api.github.com/repos/solidusio/solidus/issues/594","number":594,"state":"open","locked":false,"title":"Better error messaging for stock transfers","user":{"login":"jordan-brough","id":23050,"avatar_url":"https://avatars.githubusercontent.com/u/23050?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan-brough","html_url":"https://github.com/jordan-brough","followers_url":"https://api.github.com/users/jordan-brough/followers","following_url":"https://api.github.com/users/jordan-brough/following{/other_user}","gists_url":"https://api.github.com/users/jordan-brough/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan-brough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan-brough/subscriptions","organizations_url":"https://api.github.com/users/jordan-brough/orgs","repos_url":"https://api.github.com/users/jordan-brough/repos","events_url":"https://api.github.com/users/jordan-brough/events{/privacy}","received_events_url":"https://api.github.com/users/jordan-brough/received_events","type":"User","site_admin":false},"body":"Looking for feedback on this PR. We want to bubble up more detailed information when a stock transfer has errors (particularly when we go to finalize the transfer or actually make the transfer).  Does this seem like a reasonable way to do this?  Any other ideas?  If it seems OK I will add specs.\r\n\r\n- Ensure that all items are in stock before finalizing a stock\r\ntransfer. This was already happening before `transfer` but not before\r\n`finalize`.\r\n- Bubble up more error information when items are not in stock.","created_at":"2015-12-17T05:50:38Z","updated_at":"2015-12-17T13:33:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1afb90136dbb867543e9b6b61b67185b0d527005","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solidusio/solidus/pulls/594/commits","review_comments_url":"https://api.github.com/repos/solidusio/solidus/pulls/594/comments","review_comment_url":"https://api.github.com/repos/solidusio/solidus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solidusio/solidus/issues/594/comments","statuses_url":"https://api.github.com/repos/solidusio/solidus/statuses/614f68cd45d175f90152020c05427fb50c3a0972","head":{"label":"jordan-brough:stock-transfer-error-handling","ref":"stock-transfer-error-handling","sha":"614f68cd45d175f90152020c05427fb50c3a0972","user":{"login":"jordan-brough","id":23050,"avatar_url":"https://avatars.githubusercontent.com/u/23050?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan-brough","html_url":"https://github.com/jordan-brough","followers_url":"https://api.github.com/users/jordan-brough/followers","following_url":"https://api.github.com/users/jordan-brough/following{/other_user}","gists_url":"https://api.github.com/users/jordan-brough/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan-brough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan-brough/subscriptions","organizations_url":"https://api.github.com/users/jordan-brough/orgs","repos_url":"https://api.github.com/users/jordan-brough/repos","events_url":"https://api.github.com/users/jordan-brough/events{/privacy}","received_events_url":"https://api.github.com/users/jordan-brough/received_events","type":"User","site_admin":false},"repo":{"id":37918071,"name":"solidus","full_name":"jordan-brough/solidus","owner":{"login":"jordan-brough","id":23050,"avatar_url":"https://avatars.githubusercontent.com/u/23050?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan-brough","html_url":"https://github.com/jordan-brough","followers_url":"https://api.github.com/users/jordan-brough/followers","following_url":"https://api.github.com/users/jordan-brough/following{/other_user}","gists_url":"https://api.github.com/users/jordan-brough/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan-brough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan-brough/subscriptions","organizations_url":"https://api.github.com/users/jordan-brough/orgs","repos_url":"https://api.github.com/users/jordan-brough/repos","events_url":"https://api.github.com/users/jordan-brough/events{/privacy}","received_events_url":"https://api.github.com/users/jordan-brough/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jordan-brough/solidus","description":"Solidus e-commerce system","fork":true,"url":"https://api.github.com/repos/jordan-brough/solidus","forks_url":"https://api.github.com/repos/jordan-brough/solidus/forks","keys_url":"https://api.github.com/repos/jordan-brough/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jordan-brough/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jordan-brough/solidus/teams","hooks_url":"https://api.github.com/repos/jordan-brough/solidus/hooks","issue_events_url":"https://api.github.com/repos/jordan-brough/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/jordan-brough/solidus/events","assignees_url":"https://api.github.com/repos/jordan-brough/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/jordan-brough/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/jordan-brough/solidus/tags","blobs_url":"https://api.github.com/repos/jordan-brough/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jordan-brough/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jordan-brough/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/jordan-brough/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jordan-brough/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/jordan-brough/solidus/languages","stargazers_url":"https://api.github.com/repos/jordan-brough/solidus/stargazers","contributors_url":"https://api.github.com/repos/jordan-brough/solidus/contributors","subscribers_url":"https://api.github.com/repos/jordan-brough/solidus/subscribers","subscription_url":"https://api.github.com/repos/jordan-brough/solidus/subscription","commits_url":"https://api.github.com/repos/jordan-brough/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/jordan-brough/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/jordan-brough/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/jordan-brough/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/jordan-brough/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/jordan-brough/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jordan-brough/solidus/merges","archive_url":"https://api.github.com/repos/jordan-brough/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jordan-brough/solidus/downloads","issues_url":"https://api.github.com/repos/jordan-brough/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/jordan-brough/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/jordan-brough/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/jordan-brough/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jordan-brough/solidus/labels{/name}","releases_url":"https://api.github.com/repos/jordan-brough/solidus/releases{/id}","created_at":"2015-06-23T12:36:58Z","updated_at":"2015-06-23T12:37:02Z","pushed_at":"2015-12-17T05:48:50Z","git_url":"git://github.com/jordan-brough/solidus.git","ssh_url":"git@github.com:jordan-brough/solidus.git","clone_url":"https://github.com/jordan-brough/solidus.git","svn_url":"https://github.com/jordan-brough/solidus","homepage":"","size":64242,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"master"}},"base":{"label":"solidusio:master","ref":"master","sha":"c07e47f70f005829ba6a9b9d32ce72446c3e8dbe","user":{"login":"solidusio","id":11045486,"avatar_url":"https://avatars.githubusercontent.com/u/11045486?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio","html_url":"https://github.com/solidusio","followers_url":"https://api.github.com/users/solidusio/followers","following_url":"https://api.github.com/users/solidusio/following{/other_user}","gists_url":"https://api.github.com/users/solidusio/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio/subscriptions","organizations_url":"https://api.github.com/users/solidusio/orgs","repos_url":"https://api.github.com/users/solidusio/repos","events_url":"https://api.github.com/users/solidusio/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio/received_events","type":"Organization","site_admin":false},"repo":{"id":30985840,"name":"solidus","full_name":"solidusio/solidus","owner":{"login":"solidusio","id":11045486,"avatar_url":"https://avatars.githubusercontent.com/u/11045486?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio","html_url":"https://github.com/solidusio","followers_url":"https://api.github.com/users/solidusio/followers","following_url":"https://api.github.com/users/solidusio/following{/other_user}","gists_url":"https://api.github.com/users/solidusio/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio/subscriptions","organizations_url":"https://api.github.com/users/solidusio/orgs","repos_url":"https://api.github.com/users/solidusio/repos","events_url":"https://api.github.com/users/solidusio/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solidusio/solidus","description":"Solidus, Rails eCommerce System","fork":false,"url":"https://api.github.com/repos/solidusio/solidus","forks_url":"https://api.github.com/repos/solidusio/solidus/forks","keys_url":"https://api.github.com/repos/solidusio/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solidusio/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solidusio/solidus/teams","hooks_url":"https://api.github.com/repos/solidusio/solidus/hooks","issue_events_url":"https://api.github.com/repos/solidusio/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/solidusio/solidus/events","assignees_url":"https://api.github.com/repos/solidusio/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/solidusio/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/solidusio/solidus/tags","blobs_url":"https://api.github.com/repos/solidusio/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solidusio/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solidusio/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/solidusio/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solidusio/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/solidusio/solidus/languages","stargazers_url":"https://api.github.com/repos/solidusio/solidus/stargazers","contributors_url":"https://api.github.com/repos/solidusio/solidus/contributors","subscribers_url":"https://api.github.com/repos/solidusio/solidus/subscribers","subscription_url":"https://api.github.com/repos/solidusio/solidus/subscription","commits_url":"https://api.github.com/repos/solidusio/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/solidusio/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/solidusio/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/solidusio/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/solidusio/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/solidusio/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solidusio/solidus/merges","archive_url":"https://api.github.com/repos/solidusio/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solidusio/solidus/downloads","issues_url":"https://api.github.com/repos/solidusio/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/solidusio/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/solidusio/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/solidusio/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solidusio/solidus/labels{/name}","releases_url":"https://api.github.com/repos/solidusio/solidus/releases{/id}","created_at":"2015-02-18T20:41:58Z","updated_at":"2015-12-17T13:00:37Z","pushed_at":"2015-12-17T05:50:38Z","git_url":"git://github.com/solidusio/solidus.git","ssh_url":"git@github.com:solidusio/solidus.git","clone_url":"https://github.com/solidusio/solidus.git","svn_url":"https://github.com/solidusio/solidus","homepage":"http://solidus.io/","size":65094,"stargazers_count":501,"watchers_count":501,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":97,"forks":117,"open_issues":97,"watchers":501,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/594"},"html":{"href":"https://github.com/solidusio/solidus/pull/594"},"issue":{"href":"https://api.github.com/repos/solidusio/solidus/issues/594"},"comments":{"href":"https://api.github.com/repos/solidusio/solidus/issues/594/comments"},"review_comments":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/594/comments"},"review_comment":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/594/commits"},"statuses":{"href":"https://api.github.com/repos/solidusio/solidus/statuses/614f68cd45d175f90152020c05427fb50c3a0972"}}}}