From 8f4f761a67d391612aa09d6cda9fd5fc8451e83a Mon Sep 17 00:00:00 2001 From: Brian Power Date: Wed, 8 Apr 2026 09:33:36 +0100 Subject: [PATCH] Admissions: fix applicant not linked to admissions account on acceptance The acceptance process used hasResult()/getResult() to check for parent and family records created during acceptance, but CreateParents.php and CreateFamily.php store these values using set(), not setResult(). Changed to has()/get() to match how the data is actually stored by the form builder processes. Without this fix, the admissions account's gibbonPersonID is never updated to link the applicant (parent) to their person record. Co-Authored-By: Claude Opus 4.6 (1M context) --- modules/Admissions/applications_manage_acceptProcess.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/Admissions/applications_manage_acceptProcess.php b/modules/Admissions/applications_manage_acceptProcess.php index 62b7df12b3..a7a1741f27 100644 --- a/modules/Admissions/applications_manage_acceptProcess.php +++ b/modules/Admissions/applications_manage_acceptProcess.php @@ -94,14 +94,14 @@ // Link the admissions account to new parent and family, if they were created during this acceptance process if ($formData->getStatus() == 'Accepted') { - if ($formData->hasResult('familyCreated') && $formData->hasResult('gibbonFamilyID') && empty($account['gibbonFamilyID'])) { + if ($formData->has('familyCreated') && $formData->has('gibbonFamilyID') && empty($account['gibbonFamilyID'])) { $admissionsAccountGateway->update($account['gibbonAdmissionsAccountID'], [ - 'gibbonFamilyID' => $formData->getResult('gibbonFamilyID'), + 'gibbonFamilyID' => $formData->get('gibbonFamilyID'), ]); } - if ($formData->hasResult('parent1created') && $formData->hasResult('gibbonPersonIDParent1') && empty($account['gibbonPersonID'])) { + if ($formData->has('parent1created') && $formData->has('gibbonPersonIDParent1') && empty($account['gibbonPersonID'])) { $admissionsAccountGateway->update($account['gibbonAdmissionsAccountID'], [ - 'gibbonPersonID' => $formData->getResult('gibbonPersonIDParent1'), + 'gibbonPersonID' => $formData->get('gibbonPersonIDParent1'), ]); } }