Skip to content

dev/core#1833 Change default value of participant_listing_id to NULL … #17677

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

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

seamuslee001
Copy link
Contributor

…from 0

Overview

This changes the default value of participant_listing_id column to be NULL rather than 0 as that makes more sense as 0 is not a real value

Before

Default value is 0

After

Default value is NULL

ping @eileenmcnaughton @colemanw

@civibot
Copy link

civibot bot commented Jun 21, 2020

(Standard links)

@civibot civibot bot added the master label Jun 21, 2020
@mattwire
Copy link
Contributor

@seamuslee001 This makes sense. Did you check if there is any wierd/wonderful code that is actually checking for 0?

@seamuslee001
Copy link
Contributor Author

This seems to be the only relevant places that it is called from

CRM/Event/Page/EventInfo.php:    $participantListingID = $values['event']['participant_listing_id'] ?? NULL;
CRM/Event/Page/ParticipantListing/NameStatusAndDate.php:      'participant_listing_id'
CRM/Event/Page/ParticipantListing.php:      'participant_listing_id'
CRM/Event/Page/ParticipantListing.php:        'participant_listing_id',
CRM/Event/Form/ManageEvent.php:      $participantListingID = $eventInfo['participant_listing_id'] ?? NULL;
CRM/Event/Form/ManageEvent/EventInfo.php:    $this->addSelect('participant_listing_id', ['placeholder' => ts('Disabled'), 'option_url' => NULL]);
CRM/Admin/Page/EventTemplate.php:    $participantListings = CRM_Event_BAO_Event::buildOptions('participant_listing_id');
CRM/Admin/Page/EventTemplate.php:      if ($eventTemplate->participant_listing_id) {
CRM/Admin/Page/EventTemplate.php:        $allEventTemplates[$eventTemplate->id]['participant_listing'] = $participantListings[$eventTemplate->participant_listing_id];
templates/CRM/Event/Page/ManageEvent.tpl:                  {if $row.participant_listing_id}
templates/CRM/Event/Form/ManageEvent/EventInfo.tpl:    <tr class="crm-event-manage-eventinfo-form-block-participant_listing_id">
templates/CRM/Event/Form/ManageEvent/EventInfo.tpl:      <td class="label">{$form.participant_listing_id.label} {help id="id-listing" isTemplate=$isTemplate action=$action entityId=$entityId}</td>
templates/CRM/Event/Form/ManageEvent/EventInfo.tpl:      <td>{$form.participant_listing_id.html}</td>
tests/phpunit/CRM/Core/PseudoConstantTest.php:          'fieldName' => 'participant_listing_id',

@eileenmcnaughton
Copy link
Contributor

I did a few checks & didn't spot anything worrying in those places

@eileenmcnaughton eileenmcnaughton merged commit 1dea332 into civicrm:master Jun 29, 2020
@eileenmcnaughton eileenmcnaughton deleted the dev_core_1833 branch June 29, 2020 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants