Skip to content

Commit e8a2d58

Browse files
EHR Action Updates (#887)
* Check if TableInfo has a QUS in UpdateQueryAction before providing links to update. * Only allow option to reload 'All' if a manifest is defined in a URL parameter * Some cleanup
1 parent b5a5ebc commit e8a2d58

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

ehr/api-src/org/labkey/api/ehr/demographics/HousingDemographicsProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ protected Collection<FieldKey> getFieldKeys()
4747
keys.add(FieldKey.fromString("date"));
4848
keys.add(FieldKey.fromString("cond"));
4949
keys.add(FieldKey.fromString("reason"));
50-
51-
//cnprc
5250
keys.add(FieldKey.fromString("location"));
5351

5452
return keys;

ehr/src/org/labkey/ehr/EHRController.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public ModelAndView getView(EHRQueryForm form, BindException errors)
383383

384384
ActionURL url = getViewContext().getActionURL().clone();
385385

386-
if (keyField != null)
386+
if (keyField != null && ti.getUpdateService() != null)
387387
{
388388
String detailsStr;
389389
String importStr;
@@ -1427,7 +1427,14 @@ public Object execute(PopulateLookupsForm form, BindException errors) throws Exc
14271427
return null;
14281428

14291429
List<String> lookups = new ArrayList<>();
1430-
lookups.add("All");
1430+
1431+
// This is too dangerous to leave in production so only include it if a manifest is provided as a URL parameter
1432+
// such as in automated testing
1433+
if (form.getManifest() != null)
1434+
{
1435+
lookups.add("All");
1436+
}
1437+
14311438
lookups.add("lookup_sets");
14321439

14331440
BufferedReader reader = Readers.getReader(_lookupsManifest.getInputStream());

ehr/src/org/labkey/ehr/table/DefaultEHRCustomizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ private void customizeAnimalTable(AbstractTableInfo ds)
12161216
ds.addColumn(col20);
12171217

12181218
var col8 = getWrappedIdCol(us, ds, "CageClass", "demographicsCageClass");
1219-
col8.setLabel("Required Case Size");
1219+
col8.setLabel("Required Cage Size");
12201220
col8.setDescription("Calculates the cage size necessary for this animal, based on weight using The Guide requirements");
12211221
ds.addColumn(col8);
12221222

0 commit comments

Comments
 (0)