CiviCRM
  1. CiviCRM
  2. CRM-8023

Either partcipant api or test suite not handling 'participant_role_id'

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: Future Version
    • Fix Version/s: Future Version
    • Component/s: CiviCRM API
    • Labels:
      None

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

        Activity

        Hide
        Eileen McNaughton added a comment -
        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
        Show
        Eileen McNaughton added a comment - 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
        Hide
        Eileen McNaughton added a comment -
        This one is beyond me - api can't support get by participant role if the BAO doesn't
        Show
        Eileen McNaughton added a comment - This one is beyond me - api can't support get by participant role if the BAO doesn't
        Hide
        Donald A. Lobo added a comment -

        Closing issues in batch on 4/16/13 since these issues have not been worked on in a long long time
        Show
        Donald A. Lobo added a comment - Closing issues in batch on 4/16/13 since these issues have not been worked on in a long long time

          People

          • Assignee:
            Donald A. Lobo
            Reporter:
            Eileen McNaughton
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development