{"action":"created","issue":{"url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4073","repository_url":"https://api.github.com/repos/reactioncommerce/reaction","labels_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4073/labels{/name}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4073/comments","events_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4073/events","html_url":"https://github.com/reactioncommerce/reaction/pull/4073","id":309036583,"number":4073,"title":"Fix 3978 Product visibility when revisions are turned off","user":{"login":"prinzdezibel","id":1733229,"avatar_url":"https://avatars3.githubusercontent.com/u/1733229?v=4","gravatar_id":"","url":"https://api.github.com/users/prinzdezibel","html_url":"https://github.com/prinzdezibel","followers_url":"https://api.github.com/users/prinzdezibel/followers","following_url":"https://api.github.com/users/prinzdezibel/following{/other_user}","gists_url":"https://api.github.com/users/prinzdezibel/gists{/gist_id}","starred_url":"https://api.github.com/users/prinzdezibel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prinzdezibel/subscriptions","organizations_url":"https://api.github.com/users/prinzdezibel/orgs","repos_url":"https://api.github.com/users/prinzdezibel/repos","events_url":"https://api.github.com/users/prinzdezibel/events{/privacy}","received_events_url":"https://api.github.com/users/prinzdezibel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2018-03-27T16:11:24Z","updated_at":"2018-04-10T15:04:32Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/reactioncommerce/reaction/pulls/4073","html_url":"https://github.com/reactioncommerce/reaction/pull/4073","diff_url":"https://github.com/reactioncommerce/reaction/pull/4073.diff","patch_url":"https://github.com/reactioncommerce/reaction/pull/4073.patch"},"body":"Resolves #3978   \r\nImpact: **major**  \r\nType: **bugfix**\r\n\r\n## Issue\r\nIf Product Revisioning is turned off, one can't publish products to the catalog.sal.\r\n\r\n## Solution\r\nPublishing & Archiving products should also work when Products Revisions are    disabled.\r\n\r\n## Changes:\r\n- Show visibility and publish button, even if Catalog Revisions are turned off.\r\n- Remove unused function `renderViewControls`\r\n- If revision control is disabled, the archive action does set property isDeleted directly on the selected variants (instead of writing to revisions as intermediary)\r\n- Because product variants with `isDeleted === true` are not available any longer in admin view, the Publish button for that product will no longer be available (the product vanishes immediately). Therefore the code does publish the changes to the catalog immediately through calling `publishProductsToCatalog`\r\n\r\n## Breaking changes\r\nNone expected\r\n\r\n## Testing\r\n\r\nTest 1)\r\n1. As an admin, turn-off Revision control\r\n2. Navigate to the product grid and change visibility of example product\r\n3. Hit publish button\r\n4. Product should be invisible/visible for non-admin users.\r\n\r\nTest 2)\r\n1. As an admin, turn-off Revision control.\r\n2. Navigate to the PDP of the example product and change values there\r\n3. You should be able to publish changes through the \"Publish\" button\r\n4. HOWEVER, because the PDP does not retrieve it's data from the Catalog, all changes are displayed immediately for non-admin users (changes are not held in revision collection, but saved directly in `Products` collection). This is a bug which will be addressed once the PDP is also retrieving it's data from catalog. I'm creating a new ticket for that:  PLACEHOLDER NEW TICKET"},"comment":{"url":"https://api.github.com/repos/reactioncommerce/reaction/issues/comments/380134520","html_url":"https://github.com/reactioncommerce/reaction/pull/4073#issuecomment-380134520","issue_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/4073","id":380134520,"user":{"login":"prinzdezibel","id":1733229,"avatar_url":"https://avatars3.githubusercontent.com/u/1733229?v=4","gravatar_id":"","url":"https://api.github.com/users/prinzdezibel","html_url":"https://github.com/prinzdezibel","followers_url":"https://api.github.com/users/prinzdezibel/followers","following_url":"https://api.github.com/users/prinzdezibel/following{/other_user}","gists_url":"https://api.github.com/users/prinzdezibel/gists{/gist_id}","starred_url":"https://api.github.com/users/prinzdezibel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prinzdezibel/subscriptions","organizations_url":"https://api.github.com/users/prinzdezibel/orgs","repos_url":"https://api.github.com/users/prinzdezibel/repos","events_url":"https://api.github.com/users/prinzdezibel/events{/privacy}","received_events_url":"https://api.github.com/users/prinzdezibel/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T15:04:32Z","updated_at":"2018-04-10T15:04:32Z","author_association":"MEMBER","body":"@zenweasel  Could you have a look into this again?"}}
{"actor":{"display_login":"prinzdezibel"}}