Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert merge from master #10277

Closed
wants to merge 94 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
afcaa7e
CRM-19697 Do not make use of the static _links object when customizin…
adixon Nov 30, 2016
96fce13
Fix unsubscribe group list
Apr 14, 2017
a857867
CRM-20435: Conservative replacement of SQL-based activityContact crea…
universalhandle Apr 15, 2017
9629f52
Add test
Apr 17, 2017
15816cb
CRM-20172: Added test and fix for correct amounts.
twomice Apr 14, 2017
00e8913
CRM-20453 - XML schema clean up: <value> tag
seancolsen Apr 20, 2017
66ca562
CRM-20453 - XML schema clean up: Checkbox
seancolsen Apr 20, 2017
d993a2c
CRM-20453 - XML schema clean up: TexArea
seancolsen Apr 20, 2017
a816265
CRM-20453 - XML schema clean up: <modify>
seancolsen Apr 20, 2017
d66c61b
CRM-20459 replace all instances where CRM_Core_OptionGroup::getValue …
eileenmcnaughton Apr 21, 2017
f527e01
CRM-20459 replace all instances where CRM_Core_OptionGroup::getValue …
eileenmcnaughton Apr 21, 2017
a28ce73
CRM-20459 replace last instances where CRM_Core_OptionGroup::getValue…
eileenmcnaughton Apr 21, 2017
29a5959
CRM-20461 - Call post hook after updating additional participant status
Apr 21, 2017
1e6b547
CRM-20463 - simplify parsing of doc URLs and ensure all work.
jmcclelland Apr 21, 2017
9caf6ce
Set version to 4.7.20
totten Apr 21, 2017
7f5ae3a
CRM-20172: more thorough handling of params.
twomice Apr 21, 2017
e88906f
CRM-20308 Fix Test due to not truncating civicrm_email table
seamuslee001 Apr 22, 2017
c0e4c31
Refactored CRM-20428. Refactored sourceSQLFile by creating a separate…
JohnFF Apr 22, 2017
b6436ee
Merge pull request #10213 from seamuslee001/master
eileenmcnaughton Apr 22, 2017
036b901
Merge pull request #10203 from eileenmcnaughton/deprecate3
eileenmcnaughton Apr 22, 2017
8639c83
Merge pull request #10201 from eileenmcnaughton/deprecate2
eileenmcnaughton Apr 22, 2017
4387c66
CRM-9683 implement timezone support for CiviMail
eileenmcnaughton Apr 13, 2017
5dedf5e
Merge pull request #10215 from civicrm/4.7.19-rc
eileenmcnaughton Apr 23, 2017
6c2b97b
CRM-9683 regenerate DAOs
eileenmcnaughton Apr 13, 2017
d969ad8
Merge pull request #10200 from eileenmcnaughton/deprecate
eileenmcnaughton Apr 23, 2017
0710631
Merge pull request #10168 from GinkgoFJG/CRM-20435
eileenmcnaughton Apr 23, 2017
bc1b1f8
Merge pull request #10216 from JohnFF/refactor/CRM-20428_sourceSQLFil…
eileenmcnaughton Apr 23, 2017
cf28d07
CRM-20260 fix data errors creation in financial_line_item when editin…
eileenmcnaughton Mar 15, 2017
ffa4c20
CRM-20260, Added Unit test
pradpnayak Apr 10, 2017
83ac183
Merge pull request #10154 from eileenmcnaughton/timestamp
eileenmcnaughton Apr 23, 2017
ceef521
Address fatal errors on PHP7.1 - only vars can be passed by reference.
xurizaemon Apr 23, 2017
679c40f
Merge pull request #10209 from jmcclelland/CRM-20463
eileenmcnaughton Apr 23, 2017
43a6933
Merge pull request #9471 from adixon/CRM-19697
eileenmcnaughton Apr 23, 2017
d501975
Merge pull request #10217 from fuzionnz/CRM-20466-php7.1_only_vars_by…
eileenmcnaughton Apr 23, 2017
555dad5
Fixed minor template errors.
JohnFF Apr 23, 2017
0f68abc
Merge pull request #10221 from JohnFF/bugfix/minor_template_errors
eileenmcnaughton Apr 24, 2017
b013fe5
Merge pull request #10220 from civicrm/4.7.19-rc
eileenmcnaughton Apr 24, 2017
7587545
Merge pull request #10225 from civicrm/4.7.19-rc
eileenmcnaughton Apr 24, 2017
fd9e118
CRM-20450 unit test for invoice amount
eileenmcnaughton Apr 24, 2017
db05550
Merge pull request #10224 from eileenmcnaughton/inv
eileenmcnaughton Apr 24, 2017
cef76e5
Minor code tidy ups.
eileenmcnaughton Apr 24, 2017
6f0dad9
CRM-19986 Fix schema differences between a new installl and an upgrad…
seamuslee001 Feb 9, 2017
f7f14b5
use api instead
Apr 24, 2017
8f71ebd
Merge pull request #10167 from twomice/CRM-20172_membership_additiona…
eileenmcnaughton Apr 24, 2017
0f8ccd6
Merge pull request #9809 from seamuslee001/CRM-19986
eileenmcnaughton Apr 24, 2017
6a59e51
CRM-20424 Add method to mark deprecation & ensure it causes test fail
eileenmcnaughton Apr 21, 2017
6fcd001
CRM-20469 Event form currency is in a slightly different spot
adixon Apr 24, 2017
57a953d
Merge pull request #10202 from eileenmcnaughton/deprecate4
eileenmcnaughton Apr 24, 2017
70ebdf9
Merge pull request #10229 from civicrm/4.7.19-rc
eileenmcnaughton Apr 24, 2017
2b09128
Merge pull request #10230 from adixon/CRM-20469
eileenmcnaughton Apr 24, 2017
f9d1532
CRM-20472: Fix field name in error so validation will display.
twomice Apr 25, 2017
6d6037c
Merge pull request #10233 from twomice/CRM-20472_soft_credit_validati…
eileenmcnaughton Apr 25, 2017
3934ba3
Merge pull request #9984 from eileenmcnaughton/sales
eileenmcnaughton Apr 25, 2017
6b5c520
CRM-13639 minor tidy up from larger pr on logging
xurizaemon Apr 25, 2017
6420a1e
Merge pull request #10208 from jitendrapurohit/CRM-20461
monishdeb Apr 25, 2017
d758aa9
Fix typo
aydun Apr 25, 2017
01e2ba8
Merge pull request #10238 from eileenmcnaughton/log
eileenmcnaughton Apr 25, 2017
160b0cd
Merge pull request #10241 from aydun/CRM-20312
eileenmcnaughton Apr 25, 2017
b99bd21
CRM-20474 Refactor UFField api to be standardised
saurabhbatra96 Apr 25, 2017
8d90851
Merge pull request #10246 from civicrm/4.7.19-rc
eileenmcnaughton Apr 25, 2017
a510f6f
CRM-20453 - DAO changes after running GenCode.php
seancolsen Apr 25, 2017
cbcedb3
Test preparatory cleanup
eileenmcnaughton Apr 25, 2017
75d842f
CRM-20441 add test for no activities viewable and add test fix
eileenmcnaughton Apr 25, 2017
26583d3
CRM-20441 always do acl checks from api
eileenmcnaughton Apr 25, 2017
3089a01
Merge pull request #10165 from jitendrapurohit/mailingfix
eileenmcnaughton Apr 26, 2017
391f765
Merge pull request #10195 from seanmadsen/CRM-20453
eileenmcnaughton Apr 26, 2017
881d82e
Merge pull request #10251 from eileenmcnaughton/4.7.19-rc2
eileenmcnaughton Apr 26, 2017
c85b067
Merge branch 'master' into 4.7.19-rc
eileenmcnaughton Apr 26, 2017
5e8daa5
Test preparatory cleanup
eileenmcnaughton Apr 25, 2017
9fbead4
CRM-20441 add test for no activities viewable and add test fix
eileenmcnaughton Apr 25, 2017
3c9d67b
CRM-20441 always do acl checks from api
eileenmcnaughton Apr 25, 2017
81a98c5
Merge pull request #10254 from seamuslee001/4.7.19-rc
eileenmcnaughton Apr 26, 2017
14843f5
Merge pull request #10226 from eileenmcnaughton/master
eileenmcnaughton Apr 26, 2017
257bb63
Merge pull request #10244 from eileenmcnaughton/uffield1
eileenmcnaughton Apr 26, 2017
4df5878
CRM-20308: Document the new behaivour under help icon
monishdeb Apr 26, 2017
dcc0e04
CRM-20396 Corrected payment_processor in contrib params
adixon Apr 6, 2017
5e40de8
added unit test
monishdeb Apr 26, 2017
4b9cc97
Merge pull request #10124 from adixon/CRM-20396
eileenmcnaughton Apr 26, 2017
43650eb
Merge pull request #10257 from JMAConsulting/CRM-20308
eileenmcnaughton Apr 27, 2017
8a47705
CRM-20276 update line item financial amount when updating line item.
eileenmcnaughton Mar 15, 2017
972a604
CRM-20424 remove call to deprecated function.
eileenmcnaughton Apr 26, 2017
27747ae
Remove unused var. emailActivityTypeIDs is retrieved twice, statusTit…
eileenmcnaughton Apr 27, 2017
7c63ab2
minor change
monishdeb Apr 27, 2017
a80d386
Merge pull request #10235 from eileenmcnaughton/follow_on
monishdeb Apr 27, 2017
7958229
Merge pull request #10259 from eileenmcnaughton/caserc
eileenmcnaughton Apr 27, 2017
a78982f
Merge pull request #10263 from eileenmcnaughton/case
eileenmcnaughton Apr 27, 2017
6ab43e1
CRM-20481 temporarily switch back while we assess / fix performance
eileenmcnaughton Apr 27, 2017
670a76d
Merge pull request #10261 from eileenmcnaughton/activitybackout
eileenmcnaughton Apr 27, 2017
3c8e8aa
Merge branch 'master' into 4.7.19-rc
eileenmcnaughton Apr 27, 2017
43c6eb8
CRM-20493 Payment instrument id is incorrectly a required field for o…
eileenmcnaughton Apr 28, 2017
7873f40
Fix merge conflict
eileenmcnaughton Apr 27, 2017
de94185
Revert merge from master
seamuslee001 Apr 28, 2017
a19618a
Revert 3c8e8aa as well
seamuslee001 Apr 28, 2017
01d9821
Fix issues on revert
seamuslee001 Apr 28, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CRM-20461 - Call post hook after updating additional participant status
  • Loading branch information
Jitendra Purohit committed Apr 21, 2017
commit 29a595994e1f169d911cbd61112480c2074efd8f
10 changes: 7 additions & 3 deletions CRM/Event/BAO/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -1207,13 +1207,17 @@ public static function updateParticipantStatus($participantID, $oldStatusID, $ne
CRM_Core_DAO::setFieldValue('CRM_Event_DAO_Participant', $participantID, 'status_id', $newStatusID);
}

$cascadeAdditionalIds = self::getValidAdditionalIds($participantID, $oldStatusID, $newStatusID);
$additionalIds = self::getValidAdditionalIds($participantID, $oldStatusID, $newStatusID);

if (!empty($cascadeAdditionalIds)) {
$cascadeAdditionalIds = implode(',', $cascadeAdditionalIds);
if (!empty($additionalIds)) {
$cascadeAdditionalIds = implode(',', $additionalIds);
$query = "UPDATE civicrm_participant cp SET cp.status_id = %1 WHERE cp.id IN ({$cascadeAdditionalIds})";
$params = array(1 => array($newStatusID, 'Integer'));
$dao = CRM_Core_DAO::executeQuery($query, $params);
//Call post hook after updating additional participant status.
foreach ($additionalIds as $id) {
CRM_Utils_Hook::post('edit', 'Participant', $id);
}
return TRUE;
}
return FALSE;
Expand Down
19 changes: 0 additions & 19 deletions tests/phpunit/CRM/Utils/API/ReloadOptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,4 @@ public function testReloadNoChainInterferenceSequential() {
$this->assertAPISuccess($result['values'][0]['api.Email.create']);
}

/**
* An implementation of hook_civicrm_post used with all our test cases.
*
* @param $op
* @param string $objectName
* @param int $objectId
* @param $objectRef
*/
public function onPost($op, $objectName, $objectId, &$objectRef) {
if ($op == 'create' && $objectName == 'Individual') {
CRM_Core_DAO::executeQuery(
"UPDATE civicrm_contact SET nick_name = 'munged' WHERE id = %1",
array(
1 => array($objectId, 'Integer'),
)
);
}
}

}
27 changes: 27 additions & 0 deletions tests/phpunit/CiviTest/CiviUnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3812,4 +3812,31 @@ public function selectWhereClauseHook($entity, &$clauses) {
}
}

/**
* An implementation of hook_civicrm_post used with all our test cases.
*
* @param $op
* @param string $objectName
* @param int $objectId
* @param $objectRef
*/
public function onPost($op, $objectName, $objectId, &$objectRef) {
if ($op == 'create' && $objectName == 'Individual') {
CRM_Core_DAO::executeQuery(
"UPDATE civicrm_contact SET nick_name = 'munged' WHERE id = %1",
array(
1 => array($objectId, 'Integer'),
)
);
}

if ($op == 'edit' && $objectName == 'Participant') {
$params = array(
1 => array($objectId, 'Integer'),
);
$query = "UPDATE civicrm_participant SET source = 'Post Hook Update' WHERE id = %1";
CRM_Core_DAO::executeQuery($query, $params);
}
}

}
31 changes: 31 additions & 0 deletions tests/phpunit/api/v3/ParticipantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,4 +781,35 @@ public function testCreateParticipantWithPayment() {
$this->callAPISuccess('contact', 'delete', array('id' => $result['id']));
}

/**
* Test participant invoke post hook after status update.
*/
public function testPostHookForAdditionalParticipant() {
$participantID = $this->participantCreate(array(
'contact_id' => $this->_contactID,
'status_id' => 5,
'event_id' => $this->_eventID,
));
$participantID2 = $this->participantCreate(array(
'contact_id' => $this->_contactID2,
'event_id' => $this->_eventID,
'status_id' => 5,
'registered_by_id' => $participantID,
));

$this->hookClass->setHook('civicrm_post', array($this, 'onPost'));
$params = array(
'id' => $participantID,
'status_id' => 1,
);
$this->callAPISuccess('Participant', 'create', $params);

$result = $this->callAPISuccess('Participant', 'get', array('source' => 'Post Hook Update'));
$this->assertEquals(2, $result['count']);

$expected = array($participantID, $participantID2);
$actual = array_keys($result['values']);
$this->checkArrayEquals($expected, $actual);
}

}