From f039cc58b5f3ed01ef46ba52fda47faf53330c58 Mon Sep 17 00:00:00 2001 From: Muhammad Shahrukh <> Date: Mon, 8 Apr 2024 12:37:17 +0500 Subject: [PATCH 1/2] BTHAMM-7: Fix participant role assignment --- CRM/EventsExtras/Hook/BuildForm/BaseEvent.php | 1 + CRM/EventsExtras/Hook/BuildForm/EventInfo.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CRM/EventsExtras/Hook/BuildForm/BaseEvent.php b/CRM/EventsExtras/Hook/BuildForm/BaseEvent.php index 61b71a1..b31edd9 100644 --- a/CRM/EventsExtras/Hook/BuildForm/BaseEvent.php +++ b/CRM/EventsExtras/Hook/BuildForm/BaseEvent.php @@ -84,6 +84,7 @@ protected function hideElementBySelector($selector) { CRM_Core_Resources::singleton()->addScript( "CRM.$(function($) { $('{$selector}').hide(); + $('{$selector} .required').removeClass('required'); }); "); } diff --git a/CRM/EventsExtras/Hook/BuildForm/EventInfo.php b/CRM/EventsExtras/Hook/BuildForm/EventInfo.php index d74f15b..8dec03f 100644 --- a/CRM/EventsExtras/Hook/BuildForm/EventInfo.php +++ b/CRM/EventsExtras/Hook/BuildForm/EventInfo.php @@ -48,6 +48,7 @@ private function setDefaults(&$form) { if ($settingValues[$showRoles] == 0) { $defaults['default_role_id'] = $settingValues[$roleDefault]; $fieldIdsToHide[] = 'default_role_id'; + $form->getElement('default_role_id')->setSelected($settingValues[$roleDefault]); } $showParticipantListing = SettingsManager::SETTING_FIELDS['PARTICIPANT_LISTING']; @@ -57,6 +58,7 @@ private function setDefaults(&$form) { if ($settingValues[$showParticipantListing] == 0) { $defaults['participant_listing_id'] = $settingValues[$participantListingDefault]; $fieldIdsToHide[] = 'participant_listing_id'; + $form->getElement('participant_listing_id')->setSelected($settingValues[$participantListingDefault]); } $showIncludeMap = SettingsManager::SETTING_FIELDS['INCLUDE_MAP_LOCATION_EVENT']; From df57b247f6ccfa7d8896c604b45c44a9807a6cd3 Mon Sep 17 00:00:00 2001 From: Muhammad Shahrukh <> Date: Mon, 8 Apr 2024 13:01:25 +0500 Subject: [PATCH 2/2] BTHAMM-7: Fix failing tests --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6044547..84993bf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ jobs: run-unit-tests: runs-on: ubuntu-latest - container: compucorp/civicrm-buildkit:1.3.0-php8.0-chrome + container: compucorp/civicrm-buildkit:1.3.1-php8.0 env: CIVICRM_EXTENSIONS_DIR: site/web/sites/all/modules/civicrm/tools/extensions @@ -29,7 +29,7 @@ jobs: run : amp config:set --mysql_dsn=mysql://root:root@mysql:3306 - name: Build Drupal site - run: civibuild create drupal-clean --civi-ver 5.51.3 --cms-ver 7.79 --web-root $GITHUB_WORKSPACE/site + run: civibuild create drupal-clean --civi-ver 5.51.3 --cms-ver 7.94 --web-root $GITHUB_WORKSPACE/site - uses: compucorp/apply-patch@1.0.0 env: