Admissions: fix applicant not linked to admissions account on acceptance#2084
Admissions: fix applicant not linked to admissions account on acceptance#2084brianp-matrix wants to merge 1 commit into
Conversation
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) <noreply@anthropic.com>
SKuipers
left a comment
There was a problem hiding this comment.
Hi @brianp-matrix, I appreciate you taking time to share your code as a PR. Are you able to help explain the issue you've encountered in greater detail? I've tried to reproduce it on my end and the script seems to be working as expected, with the gibbonPersonID and gibbonFamilyID fields being populated on acceptance.
The applications_manage_acceptProcess.php script runs a method called setReadOnly, which ensures that all data captured from the acceptance process goes into Results and not the original Data, this way it does not overwrite data the applicant submitted with generated data.
So, the getResult() method should be returning the correct data at that point in the code. If you're encountering an issue and not seeing the same thing on your end, let me know what steps I can take to reproduce the issue, and I'm happy to investigate further.
Summary
applications_manage_acceptProcess.phpusedhasResult()/getResult()to check for parent and family records created during acceptanceCreateParents.phpandCreateFamily.phpstore these values usingset(), notsetResult()— so the condition always failed silentlyhas()/get()to match how the data is actually stored by the form builder processesImpact: Without this fix, accepting an application creates the student, parents, and family correctly, but the admissions account's
gibbonPersonIDis never updated — the applicant (parent) remains unlinked.Test plan
gibbonAdmissionsAccount.gibbonPersonIDis set to the parent's person IDgibbonAdmissionsAccount.gibbonFamilyIDis set to the new family ID