Skip to content

GH Issue 1813: Update base server URL callers and fix notification links - #1085

Merged
labkey-adam merged 6 commits into
developfrom
fb_base_server_url_1813
Nov 16, 2026
Merged

labkey-adam merged 6 commits into
developfrom
fb_base_server_url_1813

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Rationale

This PR updates callers for the platform rename of ActionURL.getBaseServerURL() to getBaseServerURLWithContextPath() and fixes malformed links in notification emails. GH Issue 1813

Related Pull Requests

Changes

  • Update callers to the new method name
  • Build notification links with ActionURL through shared helpers, which removes doubled slashes and encodes parameters, including animal Ids in animal history links
  • HTML-escape link URLs in notification emails
  • Fix a stray quote that broke the "all animal requests" link

…Path

Also build notification links with getURIString(), which drops the doubled slash after the host.
Removes the remaining doubled slashes after ehr/ and a stray quote that broke the all-requests href.
… link

Also HTML-escape the whole href and drop a redundant toString().
Animal history, abstract and animal request links now come from NotificationToolkit helpers, hyperlinks HTML-escape their URLs, and the necropsy and participant links encode their parameters.
labkey-adam added a commit to LabKey/targetedms that referenced this pull request Nov 14, 2026
## Rationale
This PR removes `IsLibraryCurrentAction`, which nothing in the codebase
calls. Its Panorama server check compared only query parameters and so
never rejected anything; it surfaced while auditing base server URL
callers for [GH Issue
1813](LabKey/internal-issues#1813).

## Related Pull Requests
- LabKey/platform#8341
- LabKey/premiumModules#865
- LabKey/wnprc-modules#1085
- LabKey/MacCossLabModules#691
- LabKey/onprcEHRModules#2000

## Changes
- Remove the unused chromatogram library "is current" API action and the
helper only it used
Comment on lines +954 to +951
formURL.addParameter("formType", formType);
formURL.addParameter("formtype", formType);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

High severity finding from Claude:

Issue: createFormURL now sends formtype, which ehr/taskDetails.html actually reads. Its only caller passes "necropsy" in lowercase (DeathNotificationRevamp.java:229). The form is registered as "Necropsy" (NecropsyForm.NAME), and DataEntryManager.getFormByName looks it up in a plain HashMap, which is case-sensitive (DataEntryManager.java:88).
Why it matters: The old code sent formType with a capital T, which taskDetails.html ignored, so the page looked up the task's real form type. Now every revamped death notification email links to a task page that can't find its form. The LK reviewer called the rename a fix but didn't check the value being passed.
Suggestion: Pass NecropsyForm.NAME, or leave out formtype and let taskDetails read it from the task. The JSP version already does it right by passing taskid_fs_formtype.

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.

Thanks @labkey-tchad ! Latest commit omits formtype entirely.

taskDetails reads the form type from the task; the lowercase value the caller passed broke the case-sensitive form lookups.
@labkey-adam
labkey-adam merged commit 8306631 into develop Nov 16, 2026
5 of 6 checks passed
@labkey-adam
labkey-adam deleted the fb_base_server_url_1813 branch November 16, 2026 21:21
labkey-adam added a commit to LabKey/platform that referenced this pull request Nov 16, 2026
…ds (#8341)

## Rationale
This PR makes it clear which base server URL methods include the context
path and fixes callers that built full URLs by hand.
`ActionURL.getBaseServerURL()` included the context path while
`AppProps.getBaseServerUrl()` did not, so it's renamed to
`getBaseServerURLWithContextPath()`. [GH Issue
1813](LabKey/internal-issues#1813)

## Related Pull Requests
- LabKey/premiumModules#865
- LabKey/wnprc-modules#1085
- LabKey/MacCossLabModules#691
- LabKey/onprcEHRModules#2000
- LabKey/targetedms#1306

## Changes
- Rename the `ActionURL` base server URL method so its name says it
includes the context path
- Document that `URLHelper`'s base server URI omits the context path
- Build full URLs in notification emails and the send participant group
page from the URL itself instead of concatenating pieces
- Include the full URL, not just the path, in the plain-text part of
notification emails, and HTML-escape the link in the HTML part
- Show the send participant group link exactly as it is emailed, rather
than decoded
- Render the fallback error page with the request's own view context
instead of a fabricated one
labkey-adam added a commit to LabKey/onprcEHRModules that referenced this pull request Nov 16, 2026
…ink (#2000)

## Rationale
This PR updates the SLA module for the platform rename of
`ActionURL.getBaseServerURL()` to `getBaseServerURLWithContextPath()`
and fixes the purchase order review link in SLA notification emails,
which was assembled by hand without encoding the container path. [GH
Issue 1813](LabKey/internal-issues#1813)

## Related Pull Requests
- LabKey/platform#8341
- LabKey/premiumModules#865
- LabKey/wnprc-modules#1085
- LabKey/MacCossLabModules#691
- LabKey/targetedms#1306

## Changes
- Build the purchase order review link in notification emails from the
action URL instead of concatenating pieces
labkey-adam added a commit to LabKey/MacCossLabModules that referenced this pull request Nov 16, 2026
…Path (#691)

## Rationale
This PR updates callers for the platform rename of
`ActionURL.getBaseServerURL()` to `getBaseServerURLWithContextPath()`.
[GH Issue 1813](LabKey/internal-issues#1813)

## Related Pull Requests
- LabKey/platform#8341
- LabKey/premiumModules#865
- LabKey/wnprc-modules#1085
- LabKey/onprcEHRModules#2000
- LabKey/targetedms#1306

## Changes
- Update callers to the new method name
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.

4 participants