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

Drupal views retrieve participant status name instead of label

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.11
    • Fix Version/s: 4.7
    • Component/s: None
    • Labels:
    • Documentation Required?:
      None

      Description

      I refer to participant statuses since that's where I encountered the issue, but it may be the case that it is a general issue with how other pseudo constants are exposed to Drupal views.

      I needed my participant statuses to be translated when I expose them in Drupal views. Debugging showed that the participant->status view field makes use of the pseudo constant view field handler which retrieves the name of the constant. To have it translated, one should better retrieve the label.

      One can achieve this by having an extra key in the views data:

      'pseudo args' => array(NULL, NULL, 'label')

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vitalie Vitalie Cracan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: