[CRM-8023] Either partcipant api or test suite not handling 'participant_role_id' Created: 03/May/11  Updated: 17/Apr/13  Resolved: 17/Apr/13

Status: Done/Fixed
Project: CiviCRM
Component/s: CiviCRM API
Affects Version/s: Unscheduled
Fix Version/s: Unscheduled

Type: Bug Priority: Minor
Reporter: Eileen McNaughton Assignee: Donald A. Lobo
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


I wrote a test to check participant_get accepts 'participant_role_id' as a filter.

It is failing on $role = CRM_Event_PseudoConstant::participantRole(); so I suspect the problem may be with the test / constant not the api



  • check get with role id - create 2 registrations with different roles.
  • Test that get without role var returns 2 & with returns one
    function testGetParamsRole() { $participantRole2 = civicrm_api('Participant', 'Create', array('version' => 3, 'id' => $this->_participantID2, 'role_id' => 2)); $params = array( 'version' => $this->_apiversion, ); $result = & civicrm_api3_participant_get($params); $this->assertEquals($result['is_error'], 0); $this->assertEquals($result['count'], 3); $params['participant_role_id'] =2; $result = & civicrm_api3_participant_get($params); $this->assertEquals($result['is_error'], 0, $result['error_message'] . "in line " . __LINE__); $this->assertEquals(2,$result['count'], "in line " . __LINE__); $this->documentMe($params,$result ,__FUNCTION__,__FILE__); }

Comment by Eileen McNaughton [ 13/Jun/11 ]

This is beyond me - it fails because


tries to call


from line 1488

require_once 'CRM/Core/Component.php';
CRM_Core_Component::alterQuery( $this, 'where' );

ie. BAO doesn't support this so I give up

Comment by Eileen McNaughton [ 13/Jun/11 ]

This one is beyond me - api can't support get by participant role if the BAO doesn't

Comment by Donald A. Lobo [ 17/Apr/13 ]

Closing issues in batch on 4/16/13 since these issues have not been worked on in a long long time

Generated at Mon Nov 19 00:39:51 UTC 2018 using JIRA 7.3.3#73014-sha1:d5be8da522213be2ca9ad7b043c51da6e4cc9754.