{"action":"created","issue":{"url":"https://api.github.com/repos/crossroads/api.goodcity/issues/157","labels_url":"https://api.github.com/repos/crossroads/api.goodcity/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/crossroads/api.goodcity/issues/157/comments","events_url":"https://api.github.com/repos/crossroads/api.goodcity/issues/157/events","html_url":"https://github.com/crossroads/api.goodcity/pull/157","id":130629359,"number":157,"title":"Package state refactor","user":{"login":"steveyken","id":149198,"avatar_url":"https://avatars.githubusercontent.com/u/149198?v=3","gravatar_id":"","url":"https://api.github.com/users/steveyken","html_url":"https://github.com/steveyken","followers_url":"https://api.github.com/users/steveyken/followers","following_url":"https://api.github.com/users/steveyken/following{/other_user}","gists_url":"https://api.github.com/users/steveyken/gists{/gist_id}","starred_url":"https://api.github.com/users/steveyken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveyken/subscriptions","organizations_url":"https://api.github.com/users/steveyken/orgs","repos_url":"https://api.github.com/users/steveyken/repos","events_url":"https://api.github.com/users/steveyken/events{/privacy}","received_events_url":"https://api.github.com/users/steveyken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"swatijadhav","id":1950768,"avatar_url":"https://avatars.githubusercontent.com/u/1950768?v=3","gravatar_id":"","url":"https://api.github.com/users/swatijadhav","html_url":"https://github.com/swatijadhav","followers_url":"https://api.github.com/users/swatijadhav/followers","following_url":"https://api.github.com/users/swatijadhav/following{/other_user}","gists_url":"https://api.github.com/users/swatijadhav/gists{/gist_id}","starred_url":"https://api.github.com/users/swatijadhav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swatijadhav/subscriptions","organizations_url":"https://api.github.com/users/swatijadhav/orgs","repos_url":"https://api.github.com/users/swatijadhav/repos","events_url":"https://api.github.com/users/swatijadhav/events{/privacy}","received_events_url":"https://api.github.com/users/swatijadhav/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-02-02T09:46:36Z","updated_at":"2016-02-02T09:51:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/crossroads/api.goodcity/pulls/157","html_url":"https://github.com/crossroads/api.goodcity/pull/157","diff_url":"https://github.com/crossroads/api.goodcity/pull/157.diff","patch_url":"https://github.com/crossroads/api.goodcity/pull/157.patch"},"body":"The thinking here is that we can encapsulate the required model state within a workflow action. In Ember, we can call the correct `state_event` and the API ensures the model is in a consistent state. We also move the `inventory_number=nil` mutation to the `receive` action to fix an edge case where item is marked missing but already has a barcode label on it and is then subsequently added back into inventory. It will keep the same label."},"comment":{"url":"https://api.github.com/repos/crossroads/api.goodcity/issues/comments/178481103","html_url":"https://github.com/crossroads/api.goodcity/pull/157#issuecomment-178481103","issue_url":"https://api.github.com/repos/crossroads/api.goodcity/issues/157","id":178481103,"user":{"login":"swatijadhav","id":1950768,"avatar_url":"https://avatars.githubusercontent.com/u/1950768?v=3","gravatar_id":"","url":"https://api.github.com/users/swatijadhav","html_url":"https://github.com/swatijadhav","followers_url":"https://api.github.com/users/swatijadhav/followers","following_url":"https://api.github.com/users/swatijadhav/following{/other_user}","gists_url":"https://api.github.com/users/swatijadhav/gists{/gist_id}","starred_url":"https://api.github.com/users/swatijadhav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swatijadhav/subscriptions","organizations_url":"https://api.github.com/users/swatijadhav/orgs","repos_url":"https://api.github.com/users/swatijadhav/repos","events_url":"https://api.github.com/users/swatijadhav/events{/privacy}","received_events_url":"https://api.github.com/users/swatijadhav/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T09:51:31Z","updated_at":"2016-02-02T09:51:31Z","body":"@steveyken Yes this would be good, and also better to understand the use-case. :+1: "}}