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

Participant role is no longer displayed in custom event name badges

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.3.0, 3.3.1, 3.3.2
    • Fix Version/s: None
    • Component/s: CiviEvent
    • Labels:
      None

      Description

      When generating custom name badge templates, as described in the documentation, the participant role (as text name) was previously available to the generateLabel function (overridden from the CRM_Event_Badge class) via the $participant['participant_role'] variable. This has been discarded (without warning) in version 3.3.x, presumably in relation to CRM-6507, which added multiple participant roles.

      Whilst it is possible to work around this, using $participant['participant_role_id'] and looking up the text equivalent with CRM_Event_PseudoConstant::participantRole(), this only works when only one role is selected. For some reason, if multiple roles are selected for the participant, the $participant['participant_role_id'] variable contains a concatenated list of ids, rather than an array, making it entirely useless. For example, if the participant is a Volunteer and a Speaker, they will have $participant['participant_role_id'] returned as 24. I guess this is fine until you have more than 9 participant roles (which we do).

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              spikyjt John Turner
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: