From 76332f89145d9b1f914cbf65cf4004aacb3919a3 Mon Sep 17 00:00:00 2001
From: aschmidt34 <124093649+aschmidt34@users.noreply.github.com>
Date: Thu, 13 Aug 2026 16:07:55 -0500
Subject: [PATCH 1/2] 26.3 fb ios app production merge fix (#1009)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Updated 4 files to fix the errors being thrown by TeamCity build. My
anesthesiaRecovery dataset will be created manually after deployment, so
these files needed to be updated (per Marty) to ensure the automated
tests know what the dataset will look like.
- datasets_manifest.xml: Added my dataset to the list (fixes TeamCity
error: WNPRC_EHRTest)
- datasets_metadata.xml: Listed all the columns in my dataset (fixes
TeamCity error: WNPRC_EHRTest)
- wnprcEhrTestStudyPolicy.xml: Added my table permissions (fixes
TeamCity error: testMprDataEntry)
- wnprc_ios_appModule.java: Updated my schema after changing my upgrade
script to 0.000-26.000 (fixes TeamCity error: SchemaXMLTestCase)
## Rationale
## Related Pull Requests
-
## Changes
-
---
.../study/datasets/datasets_manifest.xml | 3 +
.../study/datasets/datasets_metadata.xml | 113 ++++++++++++++++++
.../wnprc_ehr/wnprcEhrTestStudyPolicy.xml | 6 +
.../wnprc_ios_app/wnprc_ios_appModule.java | 2 +-
4 files changed, 123 insertions(+), 1 deletion(-)
diff --git a/WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_manifest.xml b/WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_manifest.xml
index af54a8e9d..06e96046e 100644
--- a/WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_manifest.xml
+++ b/WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_manifest.xml
@@ -232,5 +232,8 @@
+
+
+
\ No newline at end of file
diff --git a/WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_metadata.xml b/WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_metadata.xml
index 82b520229..e1680dd5d 100644
--- a/WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_metadata.xml
+++ b/WNPRC_EHR/resources/referenceStudy/study/datasets/datasets_metadata.xml
@@ -16334,4 +16334,117 @@
+
+
+
+ varchar
+ Id
+ Subject identifier
+ http://cpas.labkey.com/Study#ParticipantId
+ http://cpas.labkey.com/Study#ParticipantId
+ false
+ /ehr/participantView.view?participantId=${id}
+
+ ptid
+ participantid
+
+
+ study
+ Animal
+ Id
+
+ ALWAYS_OFF
+ 32
+
+
+ integer
+
+
+ timestamp
+
+
+ timestamp
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+ varchar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WNPRC_EHR/test/sampledata/wnprc_ehr/wnprcEhrTestStudyPolicy.xml b/WNPRC_EHR/test/sampledata/wnprc_ehr/wnprcEhrTestStudyPolicy.xml
index 69867afde..b91d36ea9 100644
--- a/WNPRC_EHR/test/sampledata/wnprc_ehr/wnprcEhrTestStudyPolicy.xml
+++ b/WNPRC_EHR/test/sampledata/wnprc_ehr/wnprcEhrTestStudyPolicy.xml
@@ -443,5 +443,11 @@
+
+
+
+
+
+
diff --git a/wnprc_ios_app/src/org/labkey/wnprc_ios_app/wnprc_ios_appModule.java b/wnprc_ios_app/src/org/labkey/wnprc_ios_app/wnprc_ios_appModule.java
index 3025a5961..a8e555886 100644
--- a/wnprc_ios_app/src/org/labkey/wnprc_ios_app/wnprc_ios_appModule.java
+++ b/wnprc_ios_app/src/org/labkey/wnprc_ios_app/wnprc_ios_appModule.java
@@ -53,7 +53,7 @@ public String getName()
@Override
public @Nullable Double getSchemaVersion()
{
- return 25.001;
+ return 26.001;
}
@Override
From 2b7e2e83b9cfad2b871a77db5d0564b23b066597 Mon Sep 17 00:00:00 2001
From: Marty Pradere
Date: Fri, 14 Aug 2026 09:51:35 -0700
Subject: [PATCH 2/2] Handle missing file history when listing virology results
to import (#1008)
## Rationale
The "Import Results from File" list in the virology results grid could
fail to render. Each candidate file's upload date comes from a webdav
file-history lookup, and two paths through that lookup were broken: a
file with no file system audit record threw on `history[0].data.date`,
and the lookup's own failure callback called an undefined `reject`,
throwing a ReferenceError instead of rejecting. Either one rejected the
enclosing `Promise.all`, which had no rejection handler, so the window
stayed behind a "Loading..." mask with no error shown.
## Changes
- `getFileHistory` resolves instead of rejecting on a failed lookup, so
one unreadable file no longer drops the whole import list.
- Guarded the empty-history case; those files report their upload date
as `Unknown` rather than a substituted timestamp.
- Added a rejection handler to the `Promise.all` so failures hide the
loading mask and surface an alert.
- `getFileHistory` resolves `{name, uploaded}` rather than a positional
`[filename, history]` pair.
---
.../resources/web/ehr/ext3/ehrGridFormPanel.js | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/WNPRC_EHR/resources/web/ehr/ext3/ehrGridFormPanel.js b/WNPRC_EHR/resources/web/ehr/ext3/ehrGridFormPanel.js
index 34c7899ab..829869620 100644
--- a/WNPRC_EHR/resources/web/ehr/ext3/ehrGridFormPanel.js
+++ b/WNPRC_EHR/resources/web/ehr/ext3/ehrGridFormPanel.js
@@ -1077,8 +1077,8 @@ EHR.ext.GridFormPanel = Ext.extend(Ext.Panel,
if (extension === 'xlsx' || extension === 'xls') {
// need to get the date it was uploaded,
// since 'record' only provides the date when the actual file was created
- promises.push(getFileHistory(virologyResultsFolder, record.data.name).then((history) => {
- files.push({"name": history[0], "uploaded": history[1][0].data.date})
+ promises.push(getFileHistory(virologyResultsFolder, record.data.name).then((file) => {
+ files.push(file)
}))
}
@@ -1113,6 +1113,10 @@ EHR.ext.GridFormPanel = Ext.extend(Ext.Panel,
importFromFileWindow.removeAll();
importFromFileWindow.add(selectFilePanel);
importFromFileWindow.doLayout();
+ }).catch((e) => {
+ Ext.Msg.hide();
+ console.error(e);
+ Ext.Msg.alert('Error', 'Unable to build the list of files to import.');
})
},
@@ -1130,14 +1134,17 @@ EHR.ext.GridFormPanel = Ext.extend(Ext.Panel,
}
});
function getFileHistory(fileSystem, filename) {
+ // Always resolves so one unreadable file still leaves the rest importable.
return new Promise(resolve => {
fileSystem.getHistory({
path: '/' + filename,
success: function(fileSystem,path,history) {
- resolve([filename,history]);
+ // A file placed on the server outside of an upload has no audit record.
+ resolve({name: filename, uploaded: history && history.length ? history[0].data.date : null});
},
failure: function(f) {
- reject(f);
+ console.error('Unable to read file history for ' + filename, f);
+ resolve({name: filename, uploaded: null});
}
})
});
@@ -1307,7 +1314,7 @@ EHR.ext.GridFormPanel = Ext.extend(Ext.Panel,
html: '' + file.name + ''
},
{
- html: '' + new Date(file.uploaded).format("Y-m-d H:i")+ ''
+ html: '' + (file.uploaded ? new Date(file.uploaded).format("Y-m-d H:i") : 'Unknown') + ''
},
];