Fix group assignment triggers, restore admin form types, and steady test validation waits - #43
Merged
labkey-martyp merged 8 commits intoSep 14, 2026
Conversation
registerTriggerScriptOption writes to one server-wide map, so the last EHR module to start decided datasetsToCloseOnNewEntry for every container; nbri_triggers.js now sets it per-request instead. Also adds a Groups report over animal_group_members, drops the default-to-today start date on the group membership form, and retires 14 unused lookups and the S/Cull death type.
These forms were dropped when the three lists moved to Manage Lookup Tables; both surfaces now edit them.
…fb_group_assignment_lookups
The rule only runs on submit, so it never reaches the grid, and the dismissed save-error dialog keeps its text in the DOM where the page-source search still finds it. The submit that follows is the real check.
A value can be accepted at the field while the error summary still lists it, which the form handles by pointing the user at More Actions -> Re-Validate; the validation waits now do the same before failing.
The error summary repaints on a buffered event, so a validation message could read as absent before validation had reported it; wait for the form to go quiet and stay quiet instead. The new test pins animal_group_members closing on new entry, the behavior this branch moved off the server-wide trigger option map.
labkey-bpatel
approved these changes
Sep 13, 2026
| waitForNoFormError(duplicateError); | ||
|
|
||
| // Nothing to wait on before submitting: the rule never reaches the grid, and the dismissed error dialog keeps | ||
| // its text in the DOM where isTextPresent still finds it. The submit succeeding is the check. |
There was a problem hiding this comment.
Which “rule” never reaches the grid? Is this comment saying that once we set the birth grid cell, there’s no need to wait for an error given that waitForNoFormError was removed above?
Contributor
Author
There was a problem hiding this comment.
I updated it. The rule is trying to assign a second birth to a conception. It does not fire on validate, only submit.
labkey-martyp
commented
Sep 14, 2026
labkey-martyp
left a comment
Contributor
Author
There was a problem hiding this comment.
tests are green
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.
Rationale
Corrects the group assignment trigger configuration, restores the project, protocol and investigator admin forms that were lost when those lists moved to Manage Lookup Tables, and makes the module's test validation waits reliable. The trigger problem reached beyond this module: the option is held in a single server-wide map, so whichever EHR module started last decided which datasets close on new entry for every container. The branch also retires lookups and a death type that are no longer used, and adds a Groups report to the animal page.
Related Pull Requests
None.
Changes
Set the datasets closed on new entry per request from this module's own trigger script instead of registering them server-wide.
Re-register the project, protocol and investigator data entry form types so those lists are editable from both the forms and Manage Lookup Tables.
Add a Groups report to the animal page, and stop forcing the group membership start date to midnight.
Retire 14 unused lookups and the redundant Cull death type.
Re-validate the form before failing when a validation message does not clear, and remove the duplicate conception test's unpassable error wait.