Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for dev/core#2948 #22022

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Fix for dev/core#2948 #22022

merged 1 commit into from
Nov 15, 2021

Conversation

jaapjansma
Copy link
Contributor

Before

When registering for an event through the public event registration page the custom data of the participant is not available in the pre_hook and post_hook.

This was caused by the fact that the custom data is stored after the participant record has been created.

After

The custom data is passed to pre_hook and the post_hook.

Technical Details

The custom data is passed to CRM_Event_BAO_Participant::create and not stored separately after the participant record has been saved.

Comments

See https://lab.civicrm.org/dev/core/-/issues/2948 for reproduction steps.

@civibot
Copy link

civibot bot commented Nov 10, 2021

(Standard links)

@civibot civibot bot added the master label Nov 10, 2021
@demeritcowboy
Copy link
Contributor

demeritcowboy commented Nov 10, 2021

  • General standards
    • [r-explain] PASS
    • [r-user] PASS
    • [r-doc] PASS
    • [r-run] PASS
      • Tested a couple different types of participant and individual custom fields. Seems ok.
      • I didn't test the variations of multiple participants.
      • Backend registration also works ok.
  • Developer standards
    • [r-tech] PASS
    • [r-code] PASS
      • There are two things that CustomField::postProcess does that the new code doesn't but:
        • The date handling I think is left over from the old datepicker and can probably be removed someday.
        • Custom autocomplete fields don't seem to work anyway (gives 403 errors).
    • [r-maint] ?
      • Might be a bit hard to test.
    • [r-test] PASS

@demeritcowboy demeritcowboy added the merge ready PR will be merged after a few days if there are no objections label Nov 10, 2021
@agileware-justin
Copy link
Contributor

Is it possible to enter custom fields during backend registrations? I couldn't see how.

You should see them on the Participant Registration screen, right down the bottom. Might take a few secs to load.

@demeritcowboy
Copy link
Contributor

You should see them on the Participant Registration screen, right down the bottom. Might take a few secs to load.

Oh I see it's specific to the event. Ok checking.

@demeritcowboy
Copy link
Contributor

Looks good. Will update the review.

@agileware-justin
Copy link
Contributor

Cool bananas!

@demeritcowboy demeritcowboy merged commit d85ab9f into civicrm:master Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants