ROCK-8328: Fix Manage Medications to use camp-specific GroupMember matrix#209
Open
jwakefield-secc wants to merge 2 commits intomasterfrom
Open
ROCK-8328: Fix Manage Medications to use camp-specific GroupMember matrix#209jwakefield-secc wants to merge 2 commits intomasterfrom
jwakefield-secc wants to merge 2 commits intomasterfrom
Conversation
…trix The Manage Medications modal was reading/writing from the Person-level medication matrix instead of the camp-specific GroupMember copy. Each camp registration creates its own matrix via the "Medication Information Request" workflow, so edits should be scoped to that copy. This fix traces the matrix from the clicked row's AttributeMatrixItem instead of querying the Person attribute directly.
The medication grid displays from the Person-level matrix, but some camp group types use a GroupMember-level copy (created via registration workflow) while others do not. To prevent accidental deletion of Person master medications from the camp page, the Manage Medications modal is now view-only — Delete and Add buttons removed, with a note directing users to manage medications through the registration process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What Changed
ManageMeds_Clicknow traces the matrix GUID from the clicked row'sAttributeMatrixItemId→AttributeMatrix.Guidinstead of queryingPerson→AttributeValue→ matrix GUIDmdAddMedication_SaveClick,btnDeleteMed_Click) already usehfManageMedsMatrixGuidso they automatically work with the correct camp-specific matrixData Model Context
Medications, ID 67024): Master medication list on the Person entityMedications, ID 43299+): Camp-specific copy created per registration by workflow type 162 ("Medication Information Request")AttributeMatrixCopyaction copies the Person matrix into a new matrix on the GroupMember at registration timeTest Plan