{"action":"created","issue":{"url":"https://api.github.com/repos/spree/spree/issues/5255","labels_url":"https://api.github.com/repos/spree/spree/issues/5255/labels{/name}","comments_url":"https://api.github.com/repos/spree/spree/issues/5255/comments","events_url":"https://api.github.com/repos/spree/spree/issues/5255/events","html_url":"https://github.com/spree/spree/issues/5255","id":40918260,"number":5255,"title":"Address not loaded if order transitioned to my user after logging in.","user":{"login":"tesserakt","id":226206,"avatar_url":"https://avatars.githubusercontent.com/u/226206?v=3","gravatar_id":"","url":"https://api.github.com/users/tesserakt","html_url":"https://github.com/tesserakt","followers_url":"https://api.github.com/users/tesserakt/followers","following_url":"https://api.github.com/users/tesserakt/following{/other_user}","gists_url":"https://api.github.com/users/tesserakt/gists{/gist_id}","starred_url":"https://api.github.com/users/tesserakt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tesserakt/subscriptions","organizations_url":"https://api.github.com/users/tesserakt/orgs","repos_url":"https://api.github.com/users/tesserakt/repos","events_url":"https://api.github.com/users/tesserakt/events{/privacy}","received_events_url":"https://api.github.com/users/tesserakt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spree/spree/labels/unverified","name":"unverified","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-08-22T15:18:18Z","updated_at":"2015-06-01T11:23:47Z","closed_at":null,"body":"Steps to reproduce\r\n1) Log out.\r\n2) Add something to the cart\r\n3) Click checkout\r\n4) Login\r\n5) Get directed to the address page with none of your default address info filled in. \r\n\r\nI managed to fix this by calling this in the checkout_controller\r\n```\r\n  def edit\r\n    @order.assign_default_addresses! if (@order.ship_address.nil? && @order.bill_address.nil?)\r\n  end\r\n```\r\n\r\nbut it is not ideal. Thoughts? Perhaps we could put this in?\r\n\r\n```\r\nafter_transition to: :address, do: :assign_default_addresses!\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/spree/spree/issues/comments/107405543","html_url":"https://github.com/spree/spree/issues/5255#issuecomment-107405543","issue_url":"https://api.github.com/repos/spree/spree/issues/5255","id":107405543,"user":{"login":"mvz","id":10898,"avatar_url":"https://avatars.githubusercontent.com/u/10898?v=3","gravatar_id":"","url":"https://api.github.com/users/mvz","html_url":"https://github.com/mvz","followers_url":"https://api.github.com/users/mvz/followers","following_url":"https://api.github.com/users/mvz/following{/other_user}","gists_url":"https://api.github.com/users/mvz/gists{/gist_id}","starred_url":"https://api.github.com/users/mvz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvz/subscriptions","organizations_url":"https://api.github.com/users/mvz/orgs","repos_url":"https://api.github.com/users/mvz/repos","events_url":"https://api.github.com/users/mvz/events{/privacy}","received_events_url":"https://api.github.com/users/mvz/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T11:23:47Z","updated_at":"2015-06-01T11:23:47Z","body":"I'm seeing something similar with Spree 3.0, which already contains\r\n\r\n```\r\nbefore_transition to: :address, do: :assign_default_addresses!\r\n```\r\n\r\nI've noticed that going to `/checkout/address`, the order does not transition to the `address` state, hence this action is not triggered.\r\n"}}