{"action":"closed","number":7591,"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/7591","id":85899854,"html_url":"https://github.com/spree/spree/pull/7591","diff_url":"https://github.com/spree/spree/pull/7591.diff","patch_url":"https://github.com/spree/spree/pull/7591.patch","issue_url":"https://api.github.com/repos/spree/spree/issues/7591","number":7591,"state":"closed","locked":false,"title":"Return the fist coupon that has actions","user":{"login":"gaqzi","id":18167,"avatar_url":"https://avatars.githubusercontent.com/u/18167?v=3","gravatar_id":"","url":"https://api.github.com/users/gaqzi","html_url":"https://github.com/gaqzi","followers_url":"https://api.github.com/users/gaqzi/followers","following_url":"https://api.github.com/users/gaqzi/following{/other_user}","gists_url":"https://api.github.com/users/gaqzi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaqzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaqzi/subscriptions","organizations_url":"https://api.github.com/users/gaqzi/orgs","repos_url":"https://api.github.com/users/gaqzi/repos","events_url":"https://api.github.com/users/gaqzi/events{/privacy}","received_events_url":"https://api.github.com/users/gaqzi/received_events","type":"User","site_admin":false},"body":"If there are multiple active coupons with the same code Spree will\r\nalways pick the first one in primary key order. The returned promotion\r\nmay never be applicable because it doesn't have any actions. This will\r\nfilter out any coupons that doesn't have any actions.\r\n\r\nI found because my client double-clicked when creating the promotion, and to try and mitigate any problems from that happening again.\r\n\r\nThis is the same as PR #7472, just that we want to track against 3-1-stable instead of master.","created_at":"2016-09-20T02:07:14Z","updated_at":"2016-09-20T08:23:22Z","closed_at":"2016-09-20T08:23:22Z","merged_at":"2016-09-20T08:23:22Z","merge_commit_sha":"cef001300c91e0388c89a5f81e56ef28cfed3f65","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spree/spree/pulls/7591/commits","review_comments_url":"https://api.github.com/repos/spree/spree/pulls/7591/comments","review_comment_url":"https://api.github.com/repos/spree/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spree/spree/issues/7591/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/777732e699e7fd0af8c25a3b7f1f9422f67a2f75","head":{"label":"gaqzi:bugfix/3-1-coupon-without-actions-getting-returned","ref":"bugfix/3-1-coupon-without-actions-getting-returned","sha":"777732e699e7fd0af8c25a3b7f1f9422f67a2f75","user":{"login":"gaqzi","id":18167,"avatar_url":"https://avatars.githubusercontent.com/u/18167?v=3","gravatar_id":"","url":"https://api.github.com/users/gaqzi","html_url":"https://github.com/gaqzi","followers_url":"https://api.github.com/users/gaqzi/followers","following_url":"https://api.github.com/users/gaqzi/following{/other_user}","gists_url":"https://api.github.com/users/gaqzi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaqzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaqzi/subscriptions","organizations_url":"https://api.github.com/users/gaqzi/orgs","repos_url":"https://api.github.com/users/gaqzi/repos","events_url":"https://api.github.com/users/gaqzi/events{/privacy}","received_events_url":"https://api.github.com/users/gaqzi/received_events","type":"User","site_admin":false},"repo":{"id":63412235,"name":"spree","full_name":"gaqzi/spree","owner":{"login":"gaqzi","id":18167,"avatar_url":"https://avatars.githubusercontent.com/u/18167?v=3","gravatar_id":"","url":"https://api.github.com/users/gaqzi","html_url":"https://github.com/gaqzi","followers_url":"https://api.github.com/users/gaqzi/followers","following_url":"https://api.github.com/users/gaqzi/following{/other_user}","gists_url":"https://api.github.com/users/gaqzi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaqzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaqzi/subscriptions","organizations_url":"https://api.github.com/users/gaqzi/orgs","repos_url":"https://api.github.com/users/gaqzi/repos","events_url":"https://api.github.com/users/gaqzi/events{/privacy}","received_events_url":"https://api.github.com/users/gaqzi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gaqzi/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/gaqzi/spree","forks_url":"https://api.github.com/repos/gaqzi/spree/forks","keys_url":"https://api.github.com/repos/gaqzi/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaqzi/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaqzi/spree/teams","hooks_url":"https://api.github.com/repos/gaqzi/spree/hooks","issue_events_url":"https://api.github.com/repos/gaqzi/spree/issues/events{/number}","events_url":"https://api.github.com/repos/gaqzi/spree/events","assignees_url":"https://api.github.com/repos/gaqzi/spree/assignees{/user}","branches_url":"https://api.github.com/repos/gaqzi/spree/branches{/branch}","tags_url":"https://api.github.com/repos/gaqzi/spree/tags","blobs_url":"https://api.github.com/repos/gaqzi/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaqzi/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaqzi/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaqzi/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaqzi/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/gaqzi/spree/languages","stargazers_url":"https://api.github.com/repos/gaqzi/spree/stargazers","contributors_url":"https://api.github.com/repos/gaqzi/spree/contributors","subscribers_url":"https://api.github.com/repos/gaqzi/spree/subscribers","subscription_url":"https://api.github.com/repos/gaqzi/spree/subscription","commits_url":"https://api.github.com/repos/gaqzi/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaqzi/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaqzi/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaqzi/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaqzi/spree/contents/{+path}","compare_url":"https://api.github.com/repos/gaqzi/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaqzi/spree/merges","archive_url":"https://api.github.com/repos/gaqzi/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaqzi/spree/downloads","issues_url":"https://api.github.com/repos/gaqzi/spree/issues{/number}","pulls_url":"https://api.github.com/repos/gaqzi/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/gaqzi/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/gaqzi/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaqzi/spree/labels{/name}","releases_url":"https://api.github.com/repos/gaqzi/spree/releases{/id}","deployments_url":"https://api.github.com/repos/gaqzi/spree/deployments","created_at":"2016-07-15T10:03:29Z","updated_at":"2016-07-15T10:03:38Z","pushed_at":"2016-09-20T02:08:15Z","git_url":"git://github.com/gaqzi/spree.git","ssh_url":"git@github.com:gaqzi/spree.git","clone_url":"https://github.com/gaqzi/spree.git","svn_url":"https://github.com/gaqzi/spree","homepage":"http://spreecommerce.com","size":74413,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spree:3-1-stable","ref":"3-1-stable","sha":"26110a7a3bdbf0cb7fff2418fe4c3d5bfef06650","user":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","deployments_url":"https://api.github.com/repos/spree/spree/deployments","created_at":"2008-03-10T14:45:35Z","updated_at":"2016-09-20T02:47:06Z","pushed_at":"2016-09-20T08:23:22Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":102899,"stargazers_count":7816,"watchers_count":7816,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3644,"mirror_url":null,"open_issues_count":190,"forks":3644,"open_issues":190,"watchers":7816,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/7591"},"html":{"href":"https://github.com/spree/spree/pull/7591"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/7591"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/7591/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/7591/comments"},"review_comment":{"href":"https://api.github.com/repos/spree/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spree/spree/pulls/7591/commits"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/777732e699e7fd0af8c25a3b7f1f9422f67a2f75"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"damianlegawiec","id":55154,"avatar_url":"https://avatars.githubusercontent.com/u/55154?v=3","gravatar_id":"","url":"https://api.github.com/users/damianlegawiec","html_url":"https://github.com/damianlegawiec","followers_url":"https://api.github.com/users/damianlegawiec/followers","following_url":"https://api.github.com/users/damianlegawiec/following{/other_user}","gists_url":"https://api.github.com/users/damianlegawiec/gists{/gist_id}","starred_url":"https://api.github.com/users/damianlegawiec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianlegawiec/subscriptions","organizations_url":"https://api.github.com/users/damianlegawiec/orgs","repos_url":"https://api.github.com/users/damianlegawiec/repos","events_url":"https://api.github.com/users/damianlegawiec/events{/privacy}","received_events_url":"https://api.github.com/users/damianlegawiec/received_events","type":"User","site_admin":false},"comments":1,"review_comments":2,"commits":1,"additions":25,"deletions":3,"changed_files":3}}
{"actor":{"display_login":"damianlegawiec"}}