Skip to content

Fix group assignment triggers, restore admin form types, and steady test validation waits - #43

Merged
labkey-martyp merged 8 commits into
release26.7-SNAPSHOTfrom
26.7_fb_group_assignment_lookups
Sep 14, 2026
Merged

labkey-martyp merged 8 commits into
release26.7-SNAPSHOTfrom
26.7_fb_group_assignment_lookups

Conversation

@labkey-martyp

@labkey-martyp labkey-martyp commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

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.

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.
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.
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 labkey-martyp left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests are green

@labkey-martyp
labkey-martyp merged commit de55d1a into release26.7-SNAPSHOT Sep 14, 2026
2 of 3 checks passed
@labkey-martyp
labkey-martyp deleted the 26.7_fb_group_assignment_lookups branch September 14, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants