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

Batch update does not show values when using custom fields limited by event type

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.5
    • Component/s: CiviEvent, Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      I've spent the day digging through the code and am not sure how to fix it (so I'm not assigning it to myself).

      Here's how to re-produce (I've done this on the demo sandbox):

      1. Create an event (just the first page - no other config necessary)
      2. Create a custom data set of type participant restricted by event type using the same event type as the event you just created. Create just one field.
      3. Create a profile with the field you just created.
      4. Register a contact for the event, placing a value in the custom field you just created.
      5. Do a participant search for all people assigned to the event you just created. Select the one returned record and choose Batch update.
      6. Choose the profile you just created.
      7. Result: the field you filled out for the contact is shown, but without a value.

      I think the problem is in the CRM/Core/BAO/UFGroup.php file, in the setComponentDefaults method.

      Around line 3165, we define two subTypes for events: role_id and event_id. That allows us to limit by participant role and event name, but not by event type.

      Around line 3220 there is a call to:
      CRM_Core_BAO_CustomGroup::getTree() which passes the $subType parameter but does not pass a $subName parameter.

      It seems that we would need to pass both a $subName and $subType parameter for this to match properly.

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              jamie Jamie McClelland
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: