WIP View test event registrations on contact summary (event tab) #12421
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
REQUIRES CONCEPT REVIEW AND APPROVAL
Show test registrations on event tab in contact summary. (Related to #12385).
Before
Test registrations not shown.
After
Test registrations shown.
Technical Details
Most of the contact tabs use an implementation of
CRM_Core_Form_Search
to retrieve/show results. In this caseCRM_Event_Form_Search
.force=1
parameter is automatically passed to the search form class.force=1
parameter is also used to assume that we don't want test transactions.CRM_Event_Form_Search
is triggered from the contact tab the context parameter is not set and defaults to "search" which is used in quite a few other places (where we probably don't want test transactions?).switch($context)
seems to be 'participant' so we set that using urlPath.@pradpnayak Could you comment? Do you think there would be a better way to do this? It will need to be done for other entities (eg. Pledge, Case).