Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bot] Merge 24.7 to 24.11 #719

Open
wants to merge 3 commits into
base: release24.11-SNAPSHOT
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

Generated automatically.
Merging changes from: 5a8e3fa
Approve all matching PRs simultaneously.
Approval will trigger automatic merge.
Verify all PRs before approving: https://internal.labkey.com/Scrumtime/Backlog/harvest-gitOpenPullRequests.view?branch=24.11_fb_bot_merge_24.7

aschmidt34 and others added 3 commits December 13, 2024 16:59
* - In Blood Draws Today (All, Animal Care, and Vet Staff), I changed 'Assignment Status' column header to 'Unassigned' and 'Completion Status' to 'Incomplete'.  I also sorted all results so Incomplete draws show up first.
- In BloodDrawReviewTriggerNotification, I made it so warnings only send when the draw has a date of today.
- In BloodDrawReviewDailyNotification, I added a check to verify that there are no upcoming blood draws that will overdraw.

- TODO: After testing this on test servers, make sure to remove test dates in BloodDrawsTodayAll and BloodDrawReviewDailyNotification.

* Migrated automated test changes from 23.11 to 24.3.  23.11_notificationRevamps is now ready to be deleted.

* Added blood overdraw trigger notification.

* Registered new notification.

* Updated code so message sends when testing/running in browser.  Updated log for wnprc_triggers.js for when function is run to help debug until issue with webpack generation is fixed.

* Updated overdraw notification.  Notification is now created everytime blood is updated.  Logic is run inside notification to determine if current draw is an overdraw.  If it is an overdraw, the message is sent.

* Fixed issue where 'Animal Replacement Fee' showed incorrectly in the revamped Death Notification.  This occurred when the Type of Death resulted in a fee in the table 'ehr_lookups' > 'death_cause', but the 'prepaid' field was empty in the table 'study' > 'demographics'.  This was due to labkeys table lookup resulting in a string 'null' instead of a real null when using the TableSelector.  My new notifications use a new query function i wrote, but this Death Notification used the old TableSelector method.

* Reordered messages in BloodDrawReviewDailyNotification.java so overdraws are listed first.

* -NotificationToolkit.java: Updated getWeightFromAnimalID() and getSexFromAnimalID() so they use new query function getTableMultiRowMultiColumnWithFieldKeys() instead of old function getTableRowAsList().  Also moved DeathNecropsyObject and DeathDemographicObject to DeathNotificationRevamp.java.
- DeathNotificationRevamp.java: Moved DeathNecropsyObject and DeathDemographicObject here from NotificationToolkit.java.  Also cleaned up these objects and updated these them to use the new query getTableMultiRowMultiColumnWithFieldKeys.

* Removed automated tests that don't aren't finished.

* Added 2 new functions to NotificationToolkit for creating URL's.  This is to avoid hardcoding URL's per new LabKey policy.  Implimented these 2 new functions in DeathNotificationRevamp.java for getting the necropsy and animal abstract URL's.

* Adding automated tests for notifications.

* - WNPRC_EHRTest.java: Added notification setup function, multiple notification check functions, and a toolkit object containing reusable test functions that are commonly used when writing different tests.
- BloodOverdrawTriggerNotification.java & BloodDrawReviewTriggerNotification.java: Added a reset function to clear the data after notification is triggered.  This is because there are null checks that don't work when artifacts are left over from previous instances.
- NotificationToolkit.java: Added null check to checkIfBloodDrawIsOverdraw() because empty data was crashing the function.

* - DeathNotificationRevamp.java: Added a null check to make sure class doesn't cause a failure if there's no taskID in the row returned from the query.
- WNPRC_EHRTest.java: Added a check for death notification and prenatal death notification.

* Added null check before sending blood overdraw trigger manually.  The built in labkey notification setup just doesn't send a notification if there's a null body, but for my trigger notifications where I send it manually, I should check for null.

* Moved the automated tests to the end of the list and removed the @test flag.

* Disabled site-wide notifications.  Also disable individual notifications.

* Re-added 'test' tag before function.  Originally removed this because Marty said it was not necessary if I called the function in doSetup(), but it's not showing up in the console log anymore.  Trying to re-add this.

* Added try/catch for insertValueIntoBloodBilledByDataset due to duplicate data being uploaded.  Looks like labkey's loadBloodBilledByLookup() already uploads the same values.

* Added try/catch for remaining functions that insert into datasets.

* Changed a query function in checkIfAnimalIsAlive() so it no longer references my functions that use QviewObject.  Need to evenutally phase out all these functions as my new query functions work much better.

* Removing migrated alerts from ehrcron to Java based notifications

* Added comment to leave commented-out code block alone.  This will be used for future notifications, and it's very tough coding this correctly in the right order.  Please do not delete.

* Removed function call for notification tests in doSetup().  This was recommended by Binal via a LabKey ticket; it caused my test to run twice since the @test annotation already exists.

* - TriggerScriptHelper.java: Added trigger call for new AnimalRequestUpdateNotificationRevamp notification.  Also moved call for old notification inside if/else statement so 'on/off' status is checked before sending.  Will delete the old call after vefifying new version works well.

- WNPRC_EHRModule.java: Registered new EmptyNotificationRevamp and AnimalRequestUpdateNotificationRevamp notifications.

- AdminAlertsNotificationRevamp.java: Updated this notification so the days of the week are displayed in the correct order.  Also fixed an error with the wrong results being queried (needed to update the filter).

- AnimalRequestNotificationRevamp.java: Added test data to be set when notification is triggered from 'Run Report in Browser'.  Also added a resetClass function.

- AnimalRequestUpdateNotificationRevamp.java:  Created this new revamped notification.

- ColonyAlertsLiteNotificationRevamp.java: Updated this notification to use the new EmptyNotificationRevamp notification.  This is sent instead of the original notification if there is no data to be sent.

- EmptyNotificationRevamp.java: Created this new revamped notification.  This is sent when certain notifications have no data to send.  This is to prevent users from receiving empty emails, but allows Daniel and I to see that the notifications are still being sent.

- NotificationToolkit.java: Added function to send the new EmptyNotificationRevamp.java notification.

* - TriggerScriptHelper.java: Added 'sendManually' function call that I had forgotten.
- BloodDrawReviewDailyNotification.java: Added 2 extra checks requested by blood draw team.
- BloodDrawsTodayAnimalCare.java: Updated this to use the new dummy notification when there is no data to be sent.

* - animal_requests.js: Added fix for fatal issue with qcstatus being different in dataset and form.
- ColonyAlertsNotificationRevamp.java: Added extra query requested by Kim.  This query checks all animals in the 'Assignments' dataset and returns any where the project has expired or the protocol has deactivated.

* - WNPRC_EHRModule.java: Registered new notification.
- TreatmentAlertsNotificationRevamp.java: Created new notification.
- BloodDrawsTodayAll.java: Added 'incomplete count' to the notification (as requested by blood draw team).
- BloodDrawsTodayVetStaff.java: Added functionality so message does not send when there is no data (as requested by blood draw team).

* Removed joda time import statement because it was unused.

* ClinpathRefRange.sql - Added units column to table for data retrieval in ClinpathAbnormalResultsAlertsRevamp.java.
WNPRC_EHRModule.java - Registered the 2 new notifications.
ClinpathAbnormalResultsAlertsRevamp.java - Created new alert.
ClinpathAlertsRevamp.java - Created new alert.

* ClinpathResultAlertsRevamp.java: Created new revamp notification.
WNPRC_EHRModule.java: Registered new notification.

* LargeInfantAlertsRevamp.java: Created new revamped notification.
WNPRC_EHRModule.java: Registered new LargeInfantAlertwsRevamp notification.

* ClinpathAbnormalResultsAlertsRevamp.java: Fixed text display, typos, and filter.
ClinpathAlertsRevamp.java: Fixed text display.
ClinpathResultAlertsRevamp.java: Fixed filter.
ColonyAlertsNotificationRevamp.java: Added Kim's fix (there was an issue where the query retrieved inactive projects.
LargeInfantAlertsRevamp.java: Fixed text display.

---------

Co-authored-by: F. Daniel Nicolalde <[email protected]>
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