CRM-16734 Add participant tokens to participant pdf action

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.4
    • Fix Version/s: 4.7.15
    • Component/s: CiviEvent
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      User and Admin Doc
    • Sprint:
      4.7.10 Events, 4.7.14 CiviEvent
    • Funding Source:
      Contributed Code

      Description

      Participant tokens could be very usefull to add to pdf creation.
      This allows to give participant information in participant letters.
      This and the coming PR follows upon https://issues.civicrm.org/jira/browse/CRM-16599

        Attachments

          Activity

          [CRM-16734] Add participant tokens to participant pdf action
          Johan Vervloet added a comment -

          I created a pull request: https://github.com/civicrm/civicrm-core/pull/8260

          This pull request is a continuation of PR #8258, which provides event tokens for PDF letters to participants (CRM-16599).

          Andrew Hunt added a comment -

          I took the PR as part of the 4.7.8 code review process: please see the comments on the PR itself. Basically, this looks great, but it's so wide-ranging that it scoops up a handful of bugs in the process.

          Eileen McNaughton added a comment -

          There are new commits since Andrew's QA so it is time to test again!

          Richard added a comment -

          Would this also mean the participant tokens can be used in the scheduled reminder emails?
          (Or would it be very hard to expand this to the participant emails?)

          Johan Vervloet added a comment -

          PR #9038 works for us since it allows us to use participant and event tokens (including custom fields) in PDF letters. But I don't think this is how we want to solve the issue in core CiviCRM.

          What we really should do, is use a token processor to process the tokens. There is already an implementation of AbstractTokenSubscriber for events in CiviCRM, which is already used when you send scheduled reminders. But it doesn't support custom fields yet, afaik.

          So imo, we should do the following:

          • Create a token subscriber for participants
          • Add custom field support to both token subscribers (Event and Participant); maybe we can use some of the code of PR 9038.
          • Make CRM_Event_Form_Task_PDF use a token processor.

          Once this is done, we can hopefully fix CRM-16579 in a similar way.

          Eileen McNaughton added a comment -

            People

            • Assignee:
              Tim Mallezie
              Reporter:
              Tim Mallezie

              Dates

              • Created:
                Updated:
                Resolved: