{"action":"closed","number":6159,"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/6159","id":31008641,"html_url":"https://github.com/spree/spree/pull/6159","diff_url":"https://github.com/spree/spree/pull/6159.diff","patch_url":"https://github.com/spree/spree/pull/6159.patch","issue_url":"https://api.github.com/repos/spree/spree/issues/6159","number":6159,"state":"closed","locked":false,"title":"Use InventoryUnitBuilder in order importer","user":{"login":"smartacus","id":77801,"avatar_url":"https://avatars.githubusercontent.com/u/77801?v=3","gravatar_id":"","url":"https://api.github.com/users/smartacus","html_url":"https://github.com/smartacus","followers_url":"https://api.github.com/users/smartacus/followers","following_url":"https://api.github.com/users/smartacus/following{/other_user}","gists_url":"https://api.github.com/users/smartacus/gists{/gist_id}","starred_url":"https://api.github.com/users/smartacus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartacus/subscriptions","organizations_url":"https://api.github.com/users/smartacus/orgs","repos_url":"https://api.github.com/users/smartacus/repos","events_url":"https://api.github.com/users/smartacus/events{/privacy}","received_events_url":"https://api.github.com/users/smartacus/received_events","type":"User","site_admin":false},"body":"The order importer was not creating inventory units correctly when using the spree-product-assembly extension. An assembly's inventory unit variant.id != line_item.id, so no line_item.id is assigned. There are comments in the importer explaining that this can be an issue. The workaround is to use Spree::Stock::InventoryUnitBuilder which properly builds inventory units for assembly and non-assembly line items.\r\n\r\nNote: The specs aren't passing for this PR. Fixing the specs depends on the changes in #6088.","created_at":"2015-03-12T05:04:53Z","updated_at":"2015-03-17T14:56:44Z","closed_at":"2015-03-17T14:56:44Z","merged_at":null,"merge_commit_sha":"12f0654ee1e5ecd62f7035d2ee1cfa43779d4ab2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spree/spree/pulls/6159/commits","review_comments_url":"https://api.github.com/repos/spree/spree/pulls/6159/comments","review_comment_url":"https://api.github.com/repos/spree/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spree/spree/issues/6159/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/050a92884605e32b376deed010fc1655243311d4","head":{"label":"TrialGuides:importer-inventory-units","ref":"importer-inventory-units","sha":"050a92884605e32b376deed010fc1655243311d4","user":{"login":"TrialGuides","id":2974904,"avatar_url":"https://avatars.githubusercontent.com/u/2974904?v=3","gravatar_id":"","url":"https://api.github.com/users/TrialGuides","html_url":"https://github.com/TrialGuides","followers_url":"https://api.github.com/users/TrialGuides/followers","following_url":"https://api.github.com/users/TrialGuides/following{/other_user}","gists_url":"https://api.github.com/users/TrialGuides/gists{/gist_id}","starred_url":"https://api.github.com/users/TrialGuides/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrialGuides/subscriptions","organizations_url":"https://api.github.com/users/TrialGuides/orgs","repos_url":"https://api.github.com/users/TrialGuides/repos","events_url":"https://api.github.com/users/TrialGuides/events{/privacy}","received_events_url":"https://api.github.com/users/TrialGuides/received_events","type":"Organization","site_admin":false},"repo":{"id":31393706,"name":"spree","full_name":"TrialGuides/spree","owner":{"login":"TrialGuides","id":2974904,"avatar_url":"https://avatars.githubusercontent.com/u/2974904?v=3","gravatar_id":"","url":"https://api.github.com/users/TrialGuides","html_url":"https://github.com/TrialGuides","followers_url":"https://api.github.com/users/TrialGuides/followers","following_url":"https://api.github.com/users/TrialGuides/following{/other_user}","gists_url":"https://api.github.com/users/TrialGuides/gists{/gist_id}","starred_url":"https://api.github.com/users/TrialGuides/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrialGuides/subscriptions","organizations_url":"https://api.github.com/users/TrialGuides/orgs","repos_url":"https://api.github.com/users/TrialGuides/repos","events_url":"https://api.github.com/users/TrialGuides/events{/privacy}","received_events_url":"https://api.github.com/users/TrialGuides/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TrialGuides/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/TrialGuides/spree","forks_url":"https://api.github.com/repos/TrialGuides/spree/forks","keys_url":"https://api.github.com/repos/TrialGuides/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrialGuides/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrialGuides/spree/teams","hooks_url":"https://api.github.com/repos/TrialGuides/spree/hooks","issue_events_url":"https://api.github.com/repos/TrialGuides/spree/issues/events{/number}","events_url":"https://api.github.com/repos/TrialGuides/spree/events","assignees_url":"https://api.github.com/repos/TrialGuides/spree/assignees{/user}","branches_url":"https://api.github.com/repos/TrialGuides/spree/branches{/branch}","tags_url":"https://api.github.com/repos/TrialGuides/spree/tags","blobs_url":"https://api.github.com/repos/TrialGuides/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrialGuides/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrialGuides/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrialGuides/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrialGuides/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/TrialGuides/spree/languages","stargazers_url":"https://api.github.com/repos/TrialGuides/spree/stargazers","contributors_url":"https://api.github.com/repos/TrialGuides/spree/contributors","subscribers_url":"https://api.github.com/repos/TrialGuides/spree/subscribers","subscription_url":"https://api.github.com/repos/TrialGuides/spree/subscription","commits_url":"https://api.github.com/repos/TrialGuides/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrialGuides/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrialGuides/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrialGuides/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrialGuides/spree/contents/{+path}","compare_url":"https://api.github.com/repos/TrialGuides/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrialGuides/spree/merges","archive_url":"https://api.github.com/repos/TrialGuides/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrialGuides/spree/downloads","issues_url":"https://api.github.com/repos/TrialGuides/spree/issues{/number}","pulls_url":"https://api.github.com/repos/TrialGuides/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/TrialGuides/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/TrialGuides/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrialGuides/spree/labels{/name}","releases_url":"https://api.github.com/repos/TrialGuides/spree/releases{/id}","created_at":"2015-02-26T23:09:42Z","updated_at":"2015-03-17T05:41:36Z","pushed_at":"2015-03-17T06:02:36Z","git_url":"git://github.com/TrialGuides/spree.git","ssh_url":"git@github.com:TrialGuides/spree.git","clone_url":"https://github.com/TrialGuides/spree.git","svn_url":"https://github.com/TrialGuides/spree","homepage":"http://spreecommerce.com","size":72956,"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":"spree:master","ref":"master","sha":"3295369e0be8091f4fc91e7daa3bc4bbd281baa4","user":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","created_at":"2008-03-10T14:45:35Z","updated_at":"2015-03-17T14:56:41Z","pushed_at":"2015-03-17T14:56:41Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":132720,"stargazers_count":6117,"watchers_count":6117,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2863,"mirror_url":null,"open_issues_count":79,"forks":2863,"open_issues":79,"watchers":6117,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/6159"},"html":{"href":"https://github.com/spree/spree/pull/6159"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/6159"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/6159/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/6159/comments"},"review_comment":{"href":"https://api.github.com/repos/spree/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spree/spree/pulls/6159/commits"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/050a92884605e32b376deed010fc1655243311d4"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":5,"commits":3,"additions":43,"deletions":26,"changed_files":2}}