{"action":"created","issue":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2315","repository_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork","labels_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2315/labels{/name}","comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2315/comments","events_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2315/events","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/issues/2315","id":325358403,"number":2315,"title":"Product Import: add possibility to choose “on demand” for “set stock level” in import options","user":{"login":"myriamboure","id":8135376,"avatar_url":"https://avatars0.githubusercontent.com/u/8135376?v=4","gravatar_id":"","url":"https://api.github.com/users/myriamboure","html_url":"https://github.com/myriamboure","followers_url":"https://api.github.com/users/myriamboure/followers","following_url":"https://api.github.com/users/myriamboure/following{/other_user}","gists_url":"https://api.github.com/users/myriamboure/gists{/gist_id}","starred_url":"https://api.github.com/users/myriamboure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myriamboure/subscriptions","organizations_url":"https://api.github.com/users/myriamboure/orgs","repos_url":"https://api.github.com/users/myriamboure/repos","events_url":"https://api.github.com/users/myriamboure/events{/privacy}","received_events_url":"https://api.github.com/users/myriamboure/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-22T15:53:55Z","updated_at":"2018-05-26T18:48:47Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Description\r\nA user who imports products via csv might want to set up some items (within the csv) or all (using the import option \"set stock level\") to \"on demand\". It is not possible today.\r\n\r\n## Expected Behavior\r\nIf I click on \"set stock level\" in import options I should be able to choose \"on demand\" instead of having to choose a fix quantity\r\n\r\n## Actual Behavior\r\nSame for \"set stock level\" in import options\r\n\r\n## Steps to Reproduce\r\n1. Go to hidden https://staging.openfoodnetwork.org.uk/admin/product_import\r\n2. Upload a csv and select \"set stock level\", \"overwrite all\" or \"overwrite if empty\" (doesn't matter)\r\n3. You can only select a fix amount, no \"on demand\"\r\n\r\n## Animated Gif/Screenshot\r\n![screenshot from 2018-05-22 17-31-38](https://user-images.githubusercontent.com/8135376/40373912-39bc331a-5de8-11e8-8361-d153a15e1d9a.png)\r\n\r\n## Context\r\nListing product Import issues after first big PR\r\n\r\n## Your Environment\r\n* Version used: branch #1492 on UK staging\r\n* Browser name and version: Chrome Version 64.0.3282.167 (Official Build) (64-bit)\r\n* Operating System and version (desktop or mobile): Ubuntu 16.04 LTS\r\n\r\n## Possible Fix\r\nOn the import options, add a checkbox \"on demand?\" at the right of the quantity selection and if it is checked the quantity field should be greyed and not possible to fill in anymore\r\n![untitled presentation](https://user-images.githubusercontent.com/8135376/40374255-fe90025c-5de8-11e8-8f15-64eb2b123282.jpg)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/comments/392280883","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/issues/2315#issuecomment-392280883","issue_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2315","id":392280883,"user":{"login":"Matt-Yorkley","id":9029026,"avatar_url":"https://avatars0.githubusercontent.com/u/9029026?v=4","gravatar_id":"","url":"https://api.github.com/users/Matt-Yorkley","html_url":"https://github.com/Matt-Yorkley","followers_url":"https://api.github.com/users/Matt-Yorkley/followers","following_url":"https://api.github.com/users/Matt-Yorkley/following{/other_user}","gists_url":"https://api.github.com/users/Matt-Yorkley/gists{/gist_id}","starred_url":"https://api.github.com/users/Matt-Yorkley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Matt-Yorkley/subscriptions","organizations_url":"https://api.github.com/users/Matt-Yorkley/orgs","repos_url":"https://api.github.com/users/Matt-Yorkley/repos","events_url":"https://api.github.com/users/Matt-Yorkley/events{/privacy}","received_events_url":"https://api.github.com/users/Matt-Yorkley/received_events","type":"User","site_admin":false},"created_at":"2018-05-26T18:48:47Z","updated_at":"2018-05-26T18:48:47Z","author_association":"CONTRIBUTOR","body":"I think for setting it from csv, the column should be called `on_demand`, and the value should be `1` for yes, and blank or `0` for no."}}
{"actor":{"display_login":"Matt-Yorkley"}}