Skip to content

Commit

Permalink
Merge branch 'develop' into develop-ms-7
Browse files Browse the repository at this point in the history
  • Loading branch information
jimyhuang committed Mar 25, 2024
2 parents fc776da + 83e6862 commit 3a7310f
Show file tree
Hide file tree
Showing 232 changed files with 4,691 additions and 2,802 deletions.
24 changes: 20 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ steps:
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/add_group.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/add_membership_type.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/import.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_normal_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_nowait_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_wait_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_approval_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_unlimit_approval_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_participant.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/edit_mailing.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/contribution_spgateway.spec.js
Expand Down Expand Up @@ -129,7 +133,11 @@ steps:
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/add_group.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/add_membership_type.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/import.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_normal_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_nowait_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_wait_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_approval_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_unlimit_approval_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_participant.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/edit_mailing.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/contribution_spgateway.spec.js
Expand Down Expand Up @@ -211,7 +219,11 @@ steps:
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/add_group.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/add_membership_type.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/import.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_normal_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_nowait_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_wait_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_approval_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_unlimit_approval_register.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_participant.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/edit_mailing.spec.js
- cd $DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/contribution_spgateway.spec.js
Expand Down Expand Up @@ -292,7 +304,11 @@ steps:
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/add_group.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/add_membership_type.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/import.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_register.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_normal_register.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_nowait_register.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_wait_register.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_approval_register.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_unlimit_approval_register.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_participant.spec.js
- cd $DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/edit_mailing.spec.js
- name: notify
Expand Down
37 changes: 31 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,16 @@ jobs:
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/add_membership_type.spec.js"
- name: Frontend - Import Records - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/import.spec.js"
- name: Frontend - Event Registration - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_register.spec.js"
- name: Frontend - Event Normal Registration - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_normal_register.spec.js"
- name: Frontend - Event Registration for limited participants without waitlist - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_nowait_register.spec.js"
- name: Frontend - Event Registration for limited participants with waitlist - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_wait_register.spec.js"
- name: Frontend - Event Registration for limited participants required approval - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_approval_register.spec.js"
- name: Frontend - Event Registration for unlimited participants require approval - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_unlimit_approval_register.spec.js"
- name: Frontend - Participant Editing - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_participant.spec.js"
- name: Frontend - Mailing Editing - Playwright
Expand Down Expand Up @@ -181,8 +189,16 @@ jobs:
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/add_membership_type.spec.js"
- name: Frontend - Import Records - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/import.spec.js"
- name: Frontend - Event Registration - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_register.spec.js"
- name: Frontend - Event Normal Registration - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_normal_register.spec.js"
- name: Frontend - Event Registration for limited participants without waitlist - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_nowait_register.spec.js"
- name: Frontend - Event Registration for limited participants with waitlist - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_wait_register.spec.js"
- name: Frontend - Event Registration for limited participants required approval - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_approval_register.spec.js"
- name: Frontend - Event Registration for unlimited participants require approval - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_unlimit_approval_register.spec.js"
- name: Frontend - Participant Editing - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/sites/all/modules/civicrm/tests/playwright/ && npx playwright test tests/event_participant.spec.js"
- name: Frontend - Mailing Editing - Playwright
Expand Down Expand Up @@ -280,8 +296,16 @@ jobs:
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/add_membership_type.spec.js"
- name: Frontend - Import Records - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/import.spec.js"
- name: Frontend - Event Registration - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_register.spec.js"
- name: Frontend - Event Normal Registration - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_normal_register.spec.js"
- name: Frontend - Event Registration for limited participants without waitlist - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_nowait_register.spec.js"
- name: Frontend - Event Registration for limited participants with waitlist - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_wait_register.spec.js"
- name: Frontend - Event Registration for limited participants required approval - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_limit_approval_register.spec.js"
- name: Frontend - Event Registration for unlimited participants require approval - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_unlimit_approval_register.spec.js"
- name: Frontend - Participant Editing - Playwright
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/event_participant.spec.js"
- name: Frontend - Mailing Editing - Playwright
Expand All @@ -290,6 +314,7 @@ jobs:
run: docker exec neticrm-ci bash -c "cd \$DRUPAL_ROOT/modules/civicrm/tests/playwright/ && npx playwright test tests/contribution_booster.spec.js"



- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
14 changes: 7 additions & 7 deletions CRM/ACL/DAO/ACL.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,13 @@ static function &import($prefix = false)
{
if (!(self::$_import)) {
self::$_import = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('import', $field)) {
if ($prefix) {
self::$_import['acl'] = & $fields[$name];
self::$_import['acl'] = &$fields[$name];
} else {
self::$_import[$name] = & $fields[$name];
self::$_import[$name] = &$fields[$name];
}
}
}
Expand All @@ -300,13 +300,13 @@ static function &export($prefix = false)
{
if (!(self::$_export)) {
self::$_export = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('export', $field)) {
if ($prefix) {
self::$_export['acl'] = & $fields[$name];
self::$_export['acl'] = &$fields[$name];
} else {
self::$_export[$name] = & $fields[$name];
self::$_export[$name] = &$fields[$name];
}
}
}
Expand Down Expand Up @@ -360,7 +360,7 @@ static function tsEnum($field, $value)
*/
static function addDisplayEnums(&$values)
{
$enumFields = & CRM_ACL_DAO_ACL::getEnums();
$enumFields = &CRM_ACL_DAO_ACL::getEnums();
foreach($enumFields as $enum) {
if (isset($values[$enum])) {
$values[$enum . '_display'] = CRM_ACL_DAO_ACL::tsEnum($enum, $values[$enum]);
Expand Down
12 changes: 6 additions & 6 deletions CRM/ACL/DAO/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ static function &import($prefix = false)
{
if (!(self::$_import)) {
self::$_import = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('import', $field)) {
if ($prefix) {
self::$_import['acl_cache'] = & $fields[$name];
self::$_import['acl_cache'] = &$fields[$name];
} else {
self::$_import[$name] = & $fields[$name];
self::$_import[$name] = &$fields[$name];
}
}
}
Expand All @@ -233,13 +233,13 @@ static function &export($prefix = false)
{
if (!(self::$_export)) {
self::$_export = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('export', $field)) {
if ($prefix) {
self::$_export['acl_cache'] = & $fields[$name];
self::$_export['acl_cache'] = &$fields[$name];
} else {
self::$_export[$name] = & $fields[$name];
self::$_export[$name] = &$fields[$name];
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions CRM/ACL/DAO/EntityRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ static function &import($prefix = false)
{
if (!(self::$_import)) {
self::$_import = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('import', $field)) {
if ($prefix) {
self::$_import['acl_entity_role'] = & $fields[$name];
self::$_import['acl_entity_role'] = &$fields[$name];
} else {
self::$_import[$name] = & $fields[$name];
self::$_import[$name] = &$fields[$name];
}
}
}
Expand All @@ -228,13 +228,13 @@ static function &export($prefix = false)
{
if (!(self::$_export)) {
self::$_export = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('export', $field)) {
if ($prefix) {
self::$_export['acl_entity_role'] = & $fields[$name];
self::$_export['acl_entity_role'] = &$fields[$name];
} else {
self::$_export[$name] = & $fields[$name];
self::$_export[$name] = &$fields[$name];
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions CRM/AI/DAO/AICompletion.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,13 @@ static function &import($prefix = false)
{
if (!(self::$_import)) {
self::$_import = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('import', $field)) {
if ($prefix) {
self::$_import['aicompletion'] = & $fields[$name];
self::$_import['aicompletion'] = &$fields[$name];
} else {
self::$_import[$name] = & $fields[$name];
self::$_import[$name] = &$fields[$name];
}
}
}
Expand All @@ -418,13 +418,13 @@ static function &export($prefix = false)
{
if (!(self::$_export)) {
self::$_export = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('export', $field)) {
if ($prefix) {
self::$_export['aicompletion'] = & $fields[$name];
self::$_export['aicompletion'] = &$fields[$name];
} else {
self::$_export[$name] = & $fields[$name];
self::$_export[$name] = &$fields[$name];
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions CRM/AI/Page/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ public static function chat() {
'CiviContribute' => ['civicrm/admin/contribute/add', 'civicrm/admin/contribute/setting'],
'CiviEvent' => ['civicrm/event/add', 'civicrm/event/manage/eventInfo'],
'CiviMail' => ['civicrm/mailing/send'],
'Activity' => ['civicrm/activity/add', 'civicrm/contact/view/activity'],
'Activity' => ['civicrm/activity/add', 'civicrm/contact/view/activity', 'civicrm/contact/search'],
];

foreach ($allowPatterns as $component => $allowedUrls) {
foreach ($allowedUrls as $allowedUrl) {
if (strstr($url, $allowedUrl)) {
if ($component === "Activity" && strstr($jsondata['sourceUrl'], "atype=$mailTypeId")) {
if ($component === "Activity" && (strstr($jsondata['sourceUrl'], "atype=$mailTypeId") || strstr($jsondata['sourceUrl'], "_qf_Email_display"))) {
$data['component'] = $component;
break 2;
} elseif ($component !== "Activity") {
Expand Down
12 changes: 6 additions & 6 deletions CRM/Activity/DAO/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,13 @@ static function &import($prefix = false)
{
if (!(self::$_import)) {
self::$_import = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('import', $field)) {
if ($prefix) {
self::$_import['activity'] = & $fields[$name];
self::$_import['activity'] = &$fields[$name];
} else {
self::$_import[$name] = & $fields[$name];
self::$_import[$name] = &$fields[$name];
}
}
}
Expand All @@ -507,13 +507,13 @@ static function &export($prefix = false)
{
if (!(self::$_export)) {
self::$_export = array();
$fields = & self::fields();
$fields = &self::fields();
foreach($fields as $name => $field) {
if (CRM_Utils_Array::value('export', $field)) {
if ($prefix) {
self::$_export['activity'] = & $fields[$name];
self::$_export['activity'] = &$fields[$name];
} else {
self::$_export[$name] = & $fields[$name];
self::$_export[$name] = &$fields[$name];
}
}
}
Expand Down
Loading

0 comments on commit 3a7310f

Please sign in to comment.