{"action":"created","comment":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments/48235978","id":48235978,"diff_hunk":"@@ -0,0 +1,45 @@\n+@javascript\n+Feature: Delete an attribute\n+  In order to remove an attribute\n+  As a product manager\n+  I need to delete a text attribute\n+\n+  Background:\n+    Given the \"default\" catalog configuration\n+    And the following attribute:\n+      | label | type | useable_as_grid_filter | localizable |\n+      | name  | text | yes                    | yes         |\n+    And I am logged in as \"Julia\"\n+\n+  Scenario: Sucessfully delete a text attribute used in a product\n+    Given I am on the products page\n+    When I create a new product\n+    Then I should see the SKU and Family fields\n+    And I fill in the following information in the popin:\n+      | SKU  | caterpillar_1 |\n+    And I press the \"Save\" button in the popin\n+    Given I am on the \"caterpillar_1\" product page\n+    When I add available attributes name\n+    Then I fill in the following information:\n+      | name | My caterpillar |\n+    Then I save the product\n+    Given I am on the products page\n+    Then the grid should contain 1 elements\n+    And I should see products caterpillar_1\n+    And I show the filter \"name\"\n+    Then I should be able to use the following filters:\n+      | filter      | value | result          |\n+      | name        | My caterpillar | caterpillar_1 |\n+    Given I am on the attributes page\n+    When I click on the \"delete\" action of the row which contains \"name\"\n+    Then I confirm the deletion\n+    And the following attribute:\n+      | label | type | useable_as_grid_filter | localizable |\n+      | name  | text | yes                    | yes         |\n+    Given I am on the products page\n+    Then the grid should contain 1 elements\n+    And I should see products caterpillar_1\n+    And I show the filter \"name\"","path":"features/attribute/delete_attribute.feature","position":42,"original_position":42,"commit_id":"b1940eac17aebab8970959ce4624d5da6d85c1a3","original_commit_id":"b1940eac17aebab8970959ce4624d5da6d85c1a3","user":{"login":"juliensnz","id":1117272,"avatar_url":"https://avatars.githubusercontent.com/u/1117272?v=3","gravatar_id":"","url":"https://api.github.com/users/juliensnz","html_url":"https://github.com/juliensnz","followers_url":"https://api.github.com/users/juliensnz/followers","following_url":"https://api.github.com/users/juliensnz/following{/other_user}","gists_url":"https://api.github.com/users/juliensnz/gists{/gist_id}","starred_url":"https://api.github.com/users/juliensnz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliensnz/subscriptions","organizations_url":"https://api.github.com/users/juliensnz/orgs","repos_url":"https://api.github.com/users/juliensnz/repos","events_url":"https://api.github.com/users/juliensnz/events{/privacy}","received_events_url":"https://api.github.com/users/juliensnz/received_events","type":"User","site_admin":false},"body":"we recreated it","created_at":"2015-12-22T09:32:07Z","updated_at":"2015-12-22T09:32:07Z","html_url":"https://github.com/akeneo/pim-community-dev/pull/3789#discussion_r48235978","pull_request_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/3789","_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments/48235978"},"html":{"href":"https://github.com/akeneo/pim-community-dev/pull/3789#discussion_r48235978"},"pull_request":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/3789"}}},"pull_request":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/3789","id":54278121,"html_url":"https://github.com/akeneo/pim-community-dev/pull/3789","diff_url":"https://github.com/akeneo/pim-community-dev/pull/3789.diff","patch_url":"https://github.com/akeneo/pim-community-dev/pull/3789.patch","issue_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3789","number":3789,"state":"open","locked":false,"title":"PIM-5347: fix mongo database in case of attribute removal","user":{"login":"juliensnz","id":1117272,"avatar_url":"https://avatars.githubusercontent.com/u/1117272?v=3","gravatar_id":"","url":"https://api.github.com/users/juliensnz","html_url":"https://github.com/juliensnz","followers_url":"https://api.github.com/users/juliensnz/followers","following_url":"https://api.github.com/users/juliensnz/following{/other_user}","gists_url":"https://api.github.com/users/juliensnz/gists{/gist_id}","starred_url":"https://api.github.com/users/juliensnz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliensnz/subscriptions","organizations_url":"https://api.github.com/users/juliensnz/orgs","repos_url":"https://api.github.com/users/juliensnz/repos","events_url":"https://api.github.com/users/juliensnz/events{/privacy}","received_events_url":"https://api.github.com/users/juliensnz/received_events","type":"User","site_admin":false},"body":"| Q                 | A\r\n| ----------------- | ---\r\n| Specs             | N\r\n| Behats            | Y\r\n| Blue CI           | ?\r\n| Changelog updated | N\r\n| Review and 2 GTM  | N\r\n\r\nBefore this bug fix we didn't remove the old normalised data when we removed an old attribute. The problem was: If you remove an attribute, recreate it with the same option: you could filter on it and even if the product values where not here anymore.\r\n\r\nI added a query generator to remove the corresponding product values in normalized data and added a behat to cover this case. ","created_at":"2015-12-21T16:53:28Z","updated_at":"2015-12-22T09:32:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f4f80f5e70009f6066b0d5a501c5104ddfc4e35","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/3789/commits","review_comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/3789/comments","review_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3789/comments","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/b1940eac17aebab8970959ce4624d5da6d85c1a3","head":{"label":"akeneo:PIM-5347","ref":"PIM-5347","sha":"b1940eac17aebab8970959ce4624d5da6d85c1a3","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":5367323,"name":"pim-community-dev","full_name":"akeneo/pim-community-dev","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-community-dev","description":"[Community Development Repository] The open source Product Information Management (PIM)","fork":false,"url":"https://api.github.com/repos/akeneo/pim-community-dev","forks_url":"https://api.github.com/repos/akeneo/pim-community-dev/forks","keys_url":"https://api.github.com/repos/akeneo/pim-community-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-community-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-community-dev/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-community-dev/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/events","assignees_url":"https://api.github.com/repos/akeneo/pim-community-dev/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-community-dev/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-community-dev/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-community-dev/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-community-dev/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-community-dev/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-community-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-community-dev/merges","archive_url":"https://api.github.com/repos/akeneo/pim-community-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-community-dev/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-community-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-community-dev/releases{/id}","created_at":"2012-08-10T09:27:26Z","updated_at":"2015-12-22T07:38:41Z","pushed_at":"2015-12-22T09:26:50Z","git_url":"git://github.com/akeneo/pim-community-dev.git","ssh_url":"git@github.com:akeneo/pim-community-dev.git","clone_url":"https://github.com/akeneo/pim-community-dev.git","svn_url":"https://github.com/akeneo/pim-community-dev","homepage":"http://www.akeneo.com","size":132635,"stargazers_count":277,"watchers_count":277,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":142,"mirror_url":null,"open_issues_count":79,"forks":142,"open_issues":79,"watchers":277,"default_branch":"master"}},"base":{"label":"akeneo:1.4","ref":"1.4","sha":"5078cc4fa7c25cfa87e407902e3cde440e585254","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":5367323,"name":"pim-community-dev","full_name":"akeneo/pim-community-dev","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-community-dev","description":"[Community Development Repository] The open source Product Information Management (PIM)","fork":false,"url":"https://api.github.com/repos/akeneo/pim-community-dev","forks_url":"https://api.github.com/repos/akeneo/pim-community-dev/forks","keys_url":"https://api.github.com/repos/akeneo/pim-community-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-community-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-community-dev/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-community-dev/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/events","assignees_url":"https://api.github.com/repos/akeneo/pim-community-dev/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-community-dev/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-community-dev/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-community-dev/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-community-dev/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-community-dev/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-community-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-community-dev/merges","archive_url":"https://api.github.com/repos/akeneo/pim-community-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-community-dev/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-community-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-community-dev/releases{/id}","created_at":"2012-08-10T09:27:26Z","updated_at":"2015-12-22T07:38:41Z","pushed_at":"2015-12-22T09:26:50Z","git_url":"git://github.com/akeneo/pim-community-dev.git","ssh_url":"git@github.com:akeneo/pim-community-dev.git","clone_url":"https://github.com/akeneo/pim-community-dev.git","svn_url":"https://github.com/akeneo/pim-community-dev","homepage":"http://www.akeneo.com","size":132635,"stargazers_count":277,"watchers_count":277,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":142,"mirror_url":null,"open_issues_count":79,"forks":142,"open_issues":79,"watchers":277,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/3789"},"html":{"href":"https://github.com/akeneo/pim-community-dev/pull/3789"},"issue":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3789"},"comments":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/issues/3789/comments"},"review_comments":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/3789/comments"},"review_comment":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/3789/commits"},"statuses":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/b1940eac17aebab8970959ce4624d5da6d85c1a3"}}}}