Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-8023

Either partcipant api or test suite not handling 'participant_role_id'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: Unscheduled
    • Fix Version/s: Unscheduled
    • 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__); }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: