From 8b42f94195b2d667db5dc1d174c5be21dd1f9fb4 Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Wed, 28 Jan 2026 08:12:15 -0700 Subject: [PATCH 1/7] Update of dateFinalized when Status code is complete in clinPathRuns (#1618) * Update of dateFinalized when Status code is complete in clinPathRuns * Add schedule to run at 4:50 each day * Update descriptions in clinPathDateFinalized.xml Cleaned up the Description for the ETL and also for the transform statement * Update clinPathDateFinalized.xml * Fix cron expression hour format in XML --- .../resources/etls/clinPathDateFinalized.xml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 onprc_ehr/resources/etls/clinPathDateFinalized.xml diff --git a/onprc_ehr/resources/etls/clinPathDateFinalized.xml b/onprc_ehr/resources/etls/clinPathDateFinalized.xml new file mode 100644 index 000000000..0b49d7268 --- /dev/null +++ b/onprc_ehr/resources/etls/clinPathDateFinalized.xml @@ -0,0 +1,21 @@ + + + + + clinPathRunDateFinalized + + Clin Path Runs ensure that QCState Completed generated the Date Finalized + + + Runs Stored Procedure that checks if the Date Finalized in present for finalized Charges + + + + + + + + + + + From 146277408130e6e81e2877638de501dc2b0954ba Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Mon, 2 Feb 2026 12:10:04 -0800 Subject: [PATCH 2/7] BSU assignment dashboard additions (#1622) * Adding new grid to BSU assignment dashboard and in the alert email. * Updated queries * Updated queries with more filters * Updated queries with final edits * Updated queries with final edits * Updated queries- Last edit --- .../study/AssignmentPoolUnderTheAge.query.xml | 10 ++ .../study/AssignmentPoolUnderTheAge.sql | 56 ++++++++++ .../study/AssignmentsUnderTheAge.query.xml | 10 ++ .../queries/study/AssignmentsUnderTheAge.sql | 101 ++++++++++++++++++ .../notification/BehaviorNotification.java | 49 +++++++++ 5 files changed, 226 insertions(+) create mode 100644 onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.query.xml create mode 100644 onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.sql create mode 100644 onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.query.xml create mode 100644 onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql diff --git a/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.query.xml b/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.query.xml new file mode 100644 index 000000000..ee363ecd0 --- /dev/null +++ b/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.query.xml @@ -0,0 +1,10 @@ + + + + + + Animals under the age of 2.5 with an assignment pool note +
+
+
+
diff --git a/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.sql b/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.sql new file mode 100644 index 000000000..bfd3899c1 --- /dev/null +++ b/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.sql @@ -0,0 +1,56 @@ +/* Added by Kollil, Jan 2026 + Refer to tkt # 14056 + - Extract animals under the age of 2.5 with an "Assignment pool" note in PRIMe (under general>notes) + */ + +SELECT + a.Id, + a.Id.demographics.gender AS Sex, + a.Id.Age.ageinyears, + a.Id.curlocation.room AS Room, + a.Id.curlocation.cage AS Cage, + /* Display the (active) Notes Pertaining to DAR note text */ + ( + SELECT MAX(n.value) + FROM study.Notes n + WHERE n.Id = a.Id + AND n.category = 'Notes Pertaining to DAR' + AND n.endDate IS NULL + ) AS Notes_Pertaining_to_DAR, + /* Concatenate all active cagemate IDs into one cell */ + ( + SELECT GROUP_CONCAT(DISTINCT CAST(h.roommateId AS VARCHAR), ', ') + FROM housingRoommatesDivider h + WHERE h.Id = a.Id + AND h.removalDate IS NULL + AND h.roommateEnd IS NULL + AND h.roommateId IS NOT NULL + ) AS Cagemates, + /* Concatenate all active projects & investigator into one cell */ + ( + SELECT GROUP_CONCAT(DISTINCT CAST('[' + d.project.protocol.investigatorId.lastname + ']' + d.project.displayname + '' AS VARCHAR), ', ') + FROM housingRoommatesDivider h + LEFT JOIN study.assignment d ON d.Id = h.roommateId + WHERE h.Id = a.Id + AND h.removalDate IS NULL + AND h.roommateEnd IS NULL + AND h.roommateId IS NOT NULL + AND d.enddate IS NULL + AND d.isActive = 1 + AND d.project.displayname NOT IN ('0492-02', '0492-03') + ) AS Cagemate_Assignments + +FROM Assignment a +WHERE + a.Id.Age.ageinyears <= 2.5 + AND a.project.displayname NOT IN ('0492-02', '0492-03') + AND a.Id.demographics.species = 'Rhesus Macaque' + AND EXISTS ( + SELECT 1 + FROM study.Notes n + WHERE n.Id = a.Id + AND n.value LIKE '%Assignment pool%' + AND n.endDate IS NULL + ) + + diff --git a/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.query.xml b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.query.xml new file mode 100644 index 000000000..62259a6b4 --- /dev/null +++ b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.query.xml @@ -0,0 +1,10 @@ + + + + + + Animals under the age of 2.5 with an active assignment +
+
+
+
diff --git a/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql new file mode 100644 index 000000000..3131b0081 --- /dev/null +++ b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql @@ -0,0 +1,101 @@ +/* Added by Kollil, Jan 2026 + Refer to tkt # 14056 + - Extract animals under the age of 2.5 with an active assignment. Exclude the U42 and U42E colony maintenance assignments, i.e, center projects for these are 0492-02 and 0492-03. + */ + SELECT + a.Id, + a.Id.demographics.gender AS Sex, + a.Id.Age.ageinyears, + a.Id.curlocation.room AS Room, + a.Id.curlocation.cage AS Cage, + a.project, + a.project.protocol.displayname AS Protocol, + a.project.title AS Title, + a.project.protocol.investigatorId.lastname AS ProjectInvestigator, + CAST(a.date AS DATE) AS AssignDate, + CAST(a.enddate AS DATE) AS ReleaseDate, + CAST(a.projectedRelease AS DATE) AS ProjectedReleaseDate, + a.assignmentType, + a.projectedReleaseCondition.meaning AS ProjectedReleaseCondition, + a.releaseCondition.meaning AS ConditionAtRelease, + /* Concatenate all active cagemate IDs into one cell */ + ( + SELECT GROUP_CONCAT(DISTINCT CAST(h.roommateId AS VARCHAR), ', ') + FROM housingRoommatesDivider h + WHERE h.Id = a.Id + AND h.removalDate IS NULL + AND h.roommateEnd IS NULL + AND h.roommateId IS NOT NULL + ) AS Cagemates, + /* Concatenate all active projects & investigator into one cell */ + ( + SELECT GROUP_CONCAT(DISTINCT CAST('[' + d.project.protocol.investigatorId.lastname + ']' + d.project.displayname + '' AS VARCHAR), ', ') + FROM housingRoommatesDivider h + LEFT JOIN study.assignment d ON d.Id = h.roommateId + WHERE h.Id = a.Id + AND h.removalDate IS NULL + AND h.roommateEnd IS NULL + AND h.roommateId IS NOT NULL + AND d.enddate IS NULL + AND d.isActive = 1 + ) AS Cagemate_Assignments + +FROM Assignment a +WHERE + a.Id.Age.ageinyears <= 2.5 + AND a.Id.demographics.species = 'Rhesus Macaque' + AND a.enddate IS NULL + AND a.isActive = 1 + AND a.project.displayname NOT IN ('0492-02', '0492-03') + + + + + + + + + + + + + + + + + + + + + +-- SELECT +-- a.Id, +-- a.Id.demographics.gender AS Sex, +-- a.Id.Age.ageinyears, +-- a.Id.curlocation.room AS Room, +-- a.Id.curlocation.cage AS Cage, +-- a.project, +-- a.project.protocol.displayname AS Protocol, +-- a.project.title AS Title, +-- a.project.protocol.investigatorId.lastname AS ProjectInvestigator, +-- CAST(a.date AS DATE) AS AssignDate, +-- CAST(a.enddate AS DATE) AS ReleaseDate, +-- CAST(a.projectedRelease AS DATE) AS ProjectedReleaseDate, +-- a.assignmentType, +-- a.projectedReleaseCondition.meaning AS ProjectedReleaseCondition, +-- a.releaseCondition.meaning AS ConditionAtRelease, +-- h.roommateId AS Cagemate, +-- d.use AS Cagemate_Assignment +-- FROM Assignment a +-- LEFT JOIN housingRoommatesDivider h +-- ON h.Id = a.Id +-- AND h.removalDate IS NULL +-- AND h.roommateEnd IS NULL +-- LEFT JOIN study.demographicsUtilization d +-- ON d.Id = h.roommateId +-- WHERE +-- a.Id.Age.ageinyears <= 2.5 +-- AND a.Id.demographics.species = 'Rhesus Macaque' +-- AND a.enddate IS NULL +-- AND a.isActive = 1 +-- AND a.project.displayname NOT IN ('0492-02', '0492-03') diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java b/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java index 958d70a3f..4d49b7781 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java @@ -122,12 +122,61 @@ public String getMessageBodyHTML(Container c, User u) assignmentsStartingNext1to14Days(c,u,msg); assignmentsStartedPast1to7Days(c,u,msg); + //Added by Kollil, Jan 2026 + //Refer to tkt # 14056 + activeAssignmentsUnderTheAge(c,u,msg); + assignmentPoolUnderTheAge(c,u,msg); + notesEndingToday(c, u, msg, Arrays.asList("BSU Notes"), null); saveValues(c, toSave); return msg.toString(); } + /* Added by Kollil, Jan 2026 + Refer to tkt # 14056 + The grid should include: + - Animals under the age of 2.5 with an active assignment. Exclude the U42 and U42E colony maintenance assignments, I believe the center projects for these are 0492-02 and 0492-03. + - Animals under the age of 2.5 with an "Assignment pool" note in PRIMe (under general>notes) + */ + private void activeAssignmentsUnderTheAge(final Container c, User u, final StringBuilder msg) + { + TableInfo ti = getStudySchema(c, u).getTable("AssignmentsUnderTheAge"); + + TableSelector ts = new TableSelector(ti, null, new Sort("Id")); + long total = ts.getRowCount(); + + if (total > 0) + { + msg.append("Animals under the age of 2.5 with an active assignment excluding the U42 & U42E assignments:

"); + msg.append( total + " entries found. "); + msg.append("Click here to view them\n"); + msg.append("


\n\n"); + } + else { + msg.append("WARNING: No animals under the age of 2.5 with an active assignment!

\n"); + } + } + + private void assignmentPoolUnderTheAge(final Container c, User u, final StringBuilder msg) + { + TableInfo ti = getStudySchema(c, u).getTable("AssignmentPoolUnderTheAge"); + + TableSelector ts = new TableSelector(ti, null, new Sort("Id")); + long total = ts.getRowCount(); + + if (total > 0) + { + msg.append("Animals under the age of 2.5 with \"Assignment pool\" notes:

"); + msg.append( total + " entries found. "); + msg.append("Click here to view them\n"); + msg.append("


\n\n"); + } + else { + msg.append("WARNING: No animals under the age of 2.5 with an \"Assignment pool\" notes!

\n"); + } + } + /* Added by Kollil Nov, 2025 Priority 4: Add links to grids 3 and 4 in daily Behavior Alerts email (do not need to display full grid in email) - for grid 3 - "There are __ assignments starting in the Next 1-14 days" with a link From 20cf8d7e0afbbeed84488b90fa9b074716242a3f Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Tue, 3 Feb 2026 13:58:40 -0800 Subject: [PATCH 3/7] Behavior alert assignment pool note link update (#1626) * Fixed the query link * Added a query condition --- onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql | 1 + .../org/labkey/onprc_ehr/notification/BehaviorNotification.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql index 3131b0081..f9405ee3a 100644 --- a/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql +++ b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql @@ -38,6 +38,7 @@ AND h.roommateId IS NOT NULL AND d.enddate IS NULL AND d.isActive = 1 + AND d.project.displayname NOT IN ('0492-02', '0492-03') ) AS Cagemate_Assignments FROM Assignment a diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java b/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java index 4d49b7781..b9d63e2a5 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java @@ -169,7 +169,7 @@ private void assignmentPoolUnderTheAge(final Container c, User u, final StringBu { msg.append("Animals under the age of 2.5 with \"Assignment pool\" notes:

"); msg.append( total + " entries found. "); - msg.append("Click here to view them\n"); + msg.append("Click here to view them\n"); msg.append("


\n\n"); } else { From 801333ea1302153454364e76627500703187c64f Mon Sep 17 00:00:00 2001 From: Karl Lum Date: Fri, 6 Feb 2026 08:36:01 -0800 Subject: [PATCH 4/7] Suppress restricted issue exception on search (#1629) --- .../onprc_ehr/ONPRC_RestrictedIssueTest.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java index 7e54dae2c..5d0abf4a0 100644 --- a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java +++ b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java @@ -1,5 +1,6 @@ package org.labkey.test.tests.onprc_ehr; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -11,7 +12,9 @@ import org.labkey.test.pages.issues.DetailsPage; import org.labkey.test.pages.issues.InsertPage; import org.labkey.test.pages.issues.UpdatePage; +import org.labkey.test.pages.search.SearchResultsPage; import org.labkey.test.util.IssuesHelper; +import org.labkey.test.util.SearchHelper; import org.labkey.test.util.SqlserverOnlyTest; import org.labkey.test.util.TestUser; @@ -265,4 +268,37 @@ private Locator getIssueLinkLocator(String issueID) { return Locator.tagWithAttributeContaining("a", "href", String.format("issues-details.view?issueId=%s", issueID)); } + + @Test + public void restrictedIssueSearchTest() + { + goToProjectHome(); + + // create a few issues in the restricted list + clickAndWait(Locator.linkContainingText(RESTRICTED_ISSUES_LIST)); + DetailsPage detailsPage = _issuesHelper.addIssue("Restricted issue search test #1", USER1.getUserDisplayName()); + final String ISSUE_1 = detailsPage.getIssueId(); + InsertPage insertPage = detailsPage.clickCreateNewIssue(); + insertPage.title().set("Restricted issue search test #2"); + insertPage.assignedTo().set(USER2.getUserDisplayName()); + detailsPage = insertPage.save(); + final String ISSUE_2 = detailsPage.getIssueId(); + + SearchHelper searchHelper = new SearchHelper(this); + SearchResultsPage resultsPage = searchHelper.searchFor("Restricted issue search test"); + + // verify that we can return links even if the user doesn't have permission to view a restricted issue + Assert.assertTrue("Number of search results not expected", resultsPage.getResults().size() == 2); + + // verify assigned to users will see both results but shouldn't be able to see details of issues not assigned to them + impersonate(USER1.getEmail()); + verifyIssueAccess(ISSUE_1, true); + verifyIssueAccess(ISSUE_2, false); + stopImpersonating(false); + + impersonate(USER2.getEmail()); + verifyIssueAccess(ISSUE_1, false); + verifyIssueAccess(ISSUE_2, true); + stopImpersonating(); + } } From 3c3bb640f39a3d92741dd0cb4476275db2b15287 Mon Sep 17 00:00:00 2001 From: Lakshmi Kolli <69940873+kollil@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:37:02 -0800 Subject: [PATCH 5/7] Changed the animal age to under 3 instead 2.5 years (#1635) --- .../queries/study/AssignmentPoolUnderTheAge.query.xml | 2 +- .../queries/study/AssignmentPoolUnderTheAge.sql | 2 +- .../queries/study/AssignmentsUnderTheAge.query.xml | 2 +- .../resources/queries/study/AssignmentsUnderTheAge.sql | 2 +- .../onprc_ehr/notification/BehaviorNotification.java | 9 +++++---- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.query.xml b/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.query.xml index ee363ecd0..2d839c69e 100644 --- a/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.query.xml +++ b/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.query.xml @@ -3,7 +3,7 @@ - Animals under the age of 2.5 with an assignment pool note + Animals under the age of 3 with an assignment pool note
diff --git a/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.sql b/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.sql index bfd3899c1..da5ff511a 100644 --- a/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.sql +++ b/onprc_ehr/resources/queries/study/AssignmentPoolUnderTheAge.sql @@ -42,7 +42,7 @@ SELECT FROM Assignment a WHERE - a.Id.Age.ageinyears <= 2.5 + a.Id.Age.ageinyears <= 3 AND a.project.displayname NOT IN ('0492-02', '0492-03') AND a.Id.demographics.species = 'Rhesus Macaque' AND EXISTS ( diff --git a/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.query.xml b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.query.xml index 62259a6b4..9636deb96 100644 --- a/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.query.xml +++ b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.query.xml @@ -3,7 +3,7 @@ - Animals under the age of 2.5 with an active assignment + Animals under the age of 3 with an active assignment
diff --git a/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql index f9405ee3a..2f5234fdb 100644 --- a/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql +++ b/onprc_ehr/resources/queries/study/AssignmentsUnderTheAge.sql @@ -43,7 +43,7 @@ FROM Assignment a WHERE - a.Id.Age.ageinyears <= 2.5 + a.Id.Age.ageinyears <= 3 AND a.Id.demographics.species = 'Rhesus Macaque' AND a.enddate IS NULL AND a.isActive = 1 diff --git a/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java b/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java index b9d63e2a5..e2829e445 100644 --- a/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java +++ b/onprc_ehr/src/org/labkey/onprc_ehr/notification/BehaviorNotification.java @@ -138,6 +138,7 @@ public String getMessageBodyHTML(Container c, User u) The grid should include: - Animals under the age of 2.5 with an active assignment. Exclude the U42 and U42E colony maintenance assignments, I believe the center projects for these are 0492-02 and 0492-03. - Animals under the age of 2.5 with an "Assignment pool" note in PRIMe (under general>notes) + - 2/11/26 - change the age animals under 3 years old */ private void activeAssignmentsUnderTheAge(final Container c, User u, final StringBuilder msg) { @@ -148,13 +149,13 @@ private void activeAssignmentsUnderTheAge(final Container c, User u, final Strin if (total > 0) { - msg.append("Animals under the age of 2.5 with an active assignment excluding the U42 & U42E assignments:

"); + msg.append("Animals under the age of 3 with an active assignment excluding the U42 & U42E assignments:

"); msg.append( total + " entries found. "); msg.append("Click here to view them\n"); msg.append("


\n\n"); } else { - msg.append("WARNING: No animals under the age of 2.5 with an active assignment!

\n"); + msg.append("WARNING: No animals under the age of 3 with an active assignment!

\n"); } } @@ -167,13 +168,13 @@ private void assignmentPoolUnderTheAge(final Container c, User u, final StringBu if (total > 0) { - msg.append("Animals under the age of 2.5 with \"Assignment pool\" notes:

"); + msg.append("Animals under the age of 3 with \"Assignment pool\" notes:

"); msg.append( total + " entries found. "); msg.append("Click here to view them\n"); msg.append("


\n\n"); } else { - msg.append("WARNING: No animals under the age of 2.5 with an \"Assignment pool\" notes!

\n"); + msg.append("WARNING: No animals under the age of 3 with an \"Assignment pool\" notes!

\n"); } } From 65b720aacb71950fb8ba4ee5d333784b54652630 Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Thu, 12 Feb 2026 10:18:53 -0700 Subject: [PATCH 6/7] Made change to Billing Customizer to format total cost as a decimal (#1630) Review and approved will deploy Tonight --- .../table/ONPRC_BillingCustomizer.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/onprc_billing/src/org/labkey/onprc_billing/table/ONPRC_BillingCustomizer.java b/onprc_billing/src/org/labkey/onprc_billing/table/ONPRC_BillingCustomizer.java index 3c678ea9d..804757c78 100644 --- a/onprc_billing/src/org/labkey/onprc_billing/table/ONPRC_BillingCustomizer.java +++ b/onprc_billing/src/org/labkey/onprc_billing/table/ONPRC_BillingCustomizer.java @@ -180,8 +180,17 @@ private void addTotalCost(AbstractTableInfo ti) if (ti.getColumn("totalCost") == null && unitCost != null && ti.getColumn("quantity") != null) { - SQLFragment sql = new SQLFragment("(" + ExprColumn.STR_TABLE_ALIAS + ".unitCost * " + ExprColumn.STR_TABLE_ALIAS + ".quantity)"); - ExprColumn totalCost = new ExprColumn(ti, "totalCost", sql, JdbcType.DOUBLE, ti.getColumn("unitCost"), ti.getColumn("quantity")); + SQLFragment sql = new SQLFragment( + "CAST(ROUND((" + ExprColumn.STR_TABLE_ALIAS + ".unitCost * " + + ExprColumn.STR_TABLE_ALIAS + ".quantity), 2) AS DECIMAL(18,2))"); + ExprColumn totalCost = new ExprColumn( + ti, + "totalCost", + sql, + JdbcType.DECIMAL, + ti.getColumn("unitCost"), + ti.getColumn("quantity") + ); totalCost.setLabel("Total Cost"); totalCost.setFormat("$###,##0.00"); ti.addColumn(totalCost); From 1d23f3307a5b694ab39740857ae8f33fd9b59396 Mon Sep 17 00:00:00 2001 From: Karl Lum Date: Mon, 16 Feb 2026 15:53:50 -0800 Subject: [PATCH 7/7] Make the search more specific (#1638) --- .../labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java index 892d4551b..7689b7356 100644 --- a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java +++ b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java @@ -288,7 +288,7 @@ public void restrictedIssueSearchTest() final String ISSUE_2 = detailsPage.getIssueId(); SearchHelper searchHelper = new SearchHelper(this); - SearchResultsPage resultsPage = searchHelper.searchFor("Restricted issue search test"); + SearchResultsPage resultsPage = searchHelper.searchFor("\"Restricted issue search test\""); // verify that we can return links even if the user doesn't have permission to view a restricted issue Assert.assertTrue("Number of search results not expected", resultsPage.getResults().size() == 2);