[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


 Description   

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

http://forum.civicrm.org/index.php/topic,19778.0.html

/**

  • 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__); }


 Comments   
Comment by Eileen McNaughton [ 13/Jun/11 ]

This is beyond me - it fails because

CRM_Contact_BAO_Query

tries to call

CRM_Event_BAO_Event::where

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 Sat Sep 22 14:45:41 UTC 2018 using JIRA 7.3.3#73014-sha1:d5be8da522213be2ca9ad7b043c51da6e4cc9754.