GitHub PullRequestEvent at 2014-06-09 03:35:11
Repository: org.civicrm.module.cividiscount
Actor: eileenmcnaughton
Payload: {"action":"closed","number":50,"pull_request":{"url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls/50","id":16758199,"html_url":"https://github.com/dlobo/org.civicrm.module.cividiscount/pull/50","diff_url":"https://github.com/dlobo/org.civicrm.module.cividiscount/pull/50.diff","patch_url":"https://github.com/dlobo/org.civicrm.module.cividiscount/pull/50.patch","issue_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/50","number":50,"state":"closed","title":"Fix discount calculation code not showing","user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?","gravatar_id":"38d92549af12dbeafd0141cec5085cea","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"body":"Most of the time I spent on this was actually on thinking my fix wasn't working when it was because I was doing tests / looking for symptoms that were not going to happen  because of these 3 things. The first 2 I think are non-regressive bugs whereas the third is a feature change that may need some thought\r\n\r\n1) if there are multiple valid discount codes per event they don't all work\r\n- I'd previously added the comment \" // this seems to incorrectly set to only the last discount but it seems not to matter in the way it is used\" (https://github.com/dlobo/org.civicrm.module.cividiscount/blob/master/cividiscount.php#L388 \") because I couldn't understand why only one code was being assigned - this means that at this point https://github.com/dlobo/org.civicrm.module.cividiscount/blob/master/cividiscount.php#L215 it will only pass the latest discount\r\n\r\n2) If you are using Text price values the label to the right does not update  - making it appear the price field has not updated. The descriptive label does indicate the discount & it is reflected in the calculation (Option values are fine)\r\n\r\n3) The commit (not actually mine) that makes the price field discount work also means that you HAVE to apply a price field discount for it to work. I think it makes sense for it to default to all items rather than none if none are selected. (this is std Civi UI but we didn't do this in CiviDiscount due to outcome of our previous discussions - I can't actually recall the details)\r\nI suspect that this line is the place to look at this\r\n$priceFields = isset($discount['pricesets']) ? $discount['pricesets'] : array();","created_at":"2014-06-05T10:24:50Z","updated_at":"2014-06-09T03:35:11Z","closed_at":"2014-06-09T03:35:11Z","merged_at":null,"merge_commit_sha":"2d07d57511f9703d5abab68fdb70b21c0bb445e4","assignee":{"login":"kurund","id":151481,"avatar_url":"https://avatars.githubusercontent.com/u/151481?","gravatar_id":"399eb8c38b48472788f92ec362f61780","url":"https://api.github.com/users/kurund","html_url":"https://github.com/kurund","followers_url":"https://api.github.com/users/kurund/followers","following_url":"https://api.github.com/users/kurund/following{/other_user}","gists_url":"https://api.github.com/users/kurund/gists{/gist_id}","starred_url":"https://api.github.com/users/kurund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurund/subscriptions","organizations_url":"https://api.github.com/users/kurund/orgs","repos_url":"https://api.github.com/users/kurund/repos","events_url":"https://api.github.com/users/kurund/events{/privacy}","received_events_url":"https://api.github.com/users/kurund/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls/50/commits","review_comments_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls/50/comments","review_comment_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/50/comments","statuses_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/statuses/2fb36564977b0bbd63e7fb564d4c9ff9adc3759e","head":{"label":"eileenmcnaughton:4.4","ref":"4.4","sha":"2fb36564977b0bbd63e7fb564d4c9ff9adc3759e","user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?","gravatar_id":"38d92549af12dbeafd0141cec5085cea","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"repo":{"id":9536364,"name":"org.civicrm.module.cividiscount","full_name":"eileenmcnaughton/org.civicrm.module.cividiscount","owner":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?","gravatar_id":"38d92549af12dbeafd0141cec5085cea","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eileenmcnaughton/org.civicrm.module.cividiscount","description":"A discounting module for CiviCRM that can be used across Drupal 6/7, Joomla and WordPress","fork":true,"url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount","forks_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/forks","keys_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/teams","hooks_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/hooks","issue_events_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/issues/events{/number}","events_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/events","assignees_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/assignees{/user}","branches_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/branches{/branch}","tags_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/tags","blobs_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/git/refs{/sha}","trees_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/statuses/{sha}","languages_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/languages","stargazers_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/stargazers","contributors_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/contributors","subscribers_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/subscribers","subscription_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/subscription","commits_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/commits{/sha}","git_commits_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/git/commits{/sha}","comments_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/comments{/number}","issue_comment_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/issues/comments/{number}","contents_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/contents/{+path}","compare_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/merges","archive_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/downloads","issues_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/issues{/number}","pulls_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/pulls{/number}","milestones_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/milestones{/number}","notifications_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/labels{/name}","releases_url":"https://api.github.com/repos/eileenmcnaughton/org.civicrm.module.cividiscount/releases{/id}","created_at":"2013-04-19T02:28:14Z","updated_at":"2014-06-07T03:39:56Z","pushed_at":"2014-06-07T02:00:27Z","git_url":"git://github.com/eileenmcnaughton/org.civicrm.module.cividiscount.git","ssh_url":"git@github.com:eileenmcnaughton/org.civicrm.module.cividiscount.git","clone_url":"https://github.com/eileenmcnaughton/org.civicrm.module.cividiscount.git","svn_url":"https://github.com/eileenmcnaughton/org.civicrm.module.cividiscount","homepage":"http://civicrm.org/","size":981,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dlobo:master","ref":"master","sha":"6211dac6fbade83ac39cbcec3c970a22a1e997b4","user":{"login":"dlobo","id":409069,"avatar_url":"https://avatars.githubusercontent.com/u/409069?","gravatar_id":"f10caddffcfd1869f45e346964136585","url":"https://api.github.com/users/dlobo","html_url":"https://github.com/dlobo","followers_url":"https://api.github.com/users/dlobo/followers","following_url":"https://api.github.com/users/dlobo/following{/other_user}","gists_url":"https://api.github.com/users/dlobo/gists{/gist_id}","starred_url":"https://api.github.com/users/dlobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlobo/subscriptions","organizations_url":"https://api.github.com/users/dlobo/orgs","repos_url":"https://api.github.com/users/dlobo/repos","events_url":"https://api.github.com/users/dlobo/events{/privacy}","received_events_url":"https://api.github.com/users/dlobo/received_events","type":"User","site_admin":false},"repo":{"id":3675574,"name":"org.civicrm.module.cividiscount","full_name":"dlobo/org.civicrm.module.cividiscount","owner":{"login":"dlobo","id":409069,"avatar_url":"https://avatars.githubusercontent.com/u/409069?","gravatar_id":"f10caddffcfd1869f45e346964136585","url":"https://api.github.com/users/dlobo","html_url":"https://github.com/dlobo","followers_url":"https://api.github.com/users/dlobo/followers","following_url":"https://api.github.com/users/dlobo/following{/other_user}","gists_url":"https://api.github.com/users/dlobo/gists{/gist_id}","starred_url":"https://api.github.com/users/dlobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlobo/subscriptions","organizations_url":"https://api.github.com/users/dlobo/orgs","repos_url":"https://api.github.com/users/dlobo/repos","events_url":"https://api.github.com/users/dlobo/events{/privacy}","received_events_url":"https://api.github.com/users/dlobo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dlobo/org.civicrm.module.cividiscount","description":"A discounting module for CiviCRM that can be used across Drupal 6/7, Joomla and WordPress","fork":false,"url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount","forks_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/forks","keys_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/teams","hooks_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/hooks","issue_events_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/events{/number}","events_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/events","assignees_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/assignees{/user}","branches_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/branches{/branch}","tags_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/tags","blobs_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/statuses/{sha}","languages_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/languages","stargazers_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/stargazers","contributors_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/contributors","subscribers_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/subscribers","subscription_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/subscription","commits_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/comments/{number}","contents_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/contents/{+path}","compare_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/merges","archive_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/downloads","issues_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues{/number}","pulls_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls{/number}","milestones_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/milestones{/number}","notifications_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/labels{/name}","releases_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/releases{/id}","created_at":"2012-03-09T22:40:34Z","updated_at":"2014-06-07T11:58:21Z","pushed_at":"2014-06-07T11:58:23Z","git_url":"git://github.com/dlobo/org.civicrm.module.cividiscount.git","ssh_url":"git@github.com:dlobo/org.civicrm.module.cividiscount.git","clone_url":"https://github.com/dlobo/org.civicrm.module.cividiscount.git","svn_url":"https://github.com/dlobo/org.civicrm.module.cividiscount","homepage":"http://civicrm.org/","size":1493,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":24,"mirror_url":null,"open_issues_count":11,"forks":24,"open_issues":11,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls/50"},"html":{"href":"https://github.com/dlobo/org.civicrm.module.cividiscount/pull/50"},"issue":{"href":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/50"},"comments":{"href":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/statuses/2fb36564977b0bbd63e7fb564d4c9ff9adc3759e"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":4,"review_comments":0,"commits":15,"additions":392,"deletions":201,"changed_files":13}}