From cf14716e7e9918833108a87a95b6a07e9c836b40 Mon Sep 17 00:00:00 2001 From: Trey Chadick Date: Wed, 10 Jan 2024 12:59:53 -0800 Subject: [PATCH 1/4] Update to Hamcrest 2.2 (#5111) --- api/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/build.gradle b/api/build.gradle index 56a14fa7d58..067629305c7 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -381,7 +381,7 @@ dependencies { BuildUtils.addExternalDependency( project, new ExternalDependency( - "org.hamcrest:hamcrest-core:${hamcrestVersion}", + "org.hamcrest:hamcrest:${hamcrestVersion}", "Hamcrest", "Java Hamcrest", "http://hamcrest.org/JavaHamcrest/", From 796b9184e37863a76a2820d64cfd62c7098632ea Mon Sep 17 00:00:00 2001 From: Binal Patel Date: Wed, 10 Jan 2024 13:40:37 -0800 Subject: [PATCH 2/4] [Dataspace] - FR 48359: Curated groups and plots improvements - Active Filters - Add null check (#5115) - Add null check --- .../labkey/study/controllers/ParticipantGroupController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/study/src/org/labkey/study/controllers/ParticipantGroupController.java b/study/src/org/labkey/study/controllers/ParticipantGroupController.java index 59d0c557936..1d620c6fb1a 100644 --- a/study/src/org/labkey/study/controllers/ParticipantGroupController.java +++ b/study/src/org/labkey/study/controllers/ParticipantGroupController.java @@ -1087,7 +1087,7 @@ public ApiResponse execute(ParticipantGroupSpecification form, BindException err } //if the label has changed, update the category label as well - if (!form.getCategoryLabel().equalsIgnoreCase(category.getLabel())) + if (null != form.getCategoryLabel() && !form.getCategoryLabel().equalsIgnoreCase(category.getLabel())) { category.setLabel(form.getCategoryLabel()); ParticipantGroupManager.getInstance().setParticipantCategory(getContainer(), getUser(), category); From 9de299d7d45c8ab2c842d8e98f1436ec7f122678 Mon Sep 17 00:00:00 2001 From: Trey Chadick Date: Thu, 11 Jan 2024 08:37:14 -0800 Subject: [PATCH 3/4] Stop using deprecated `GetDomainCommand` (#5113) --- .../tests/experiment/ProvenanceAssayHelper.java | 7 ++++--- .../tests/experiment/VocabularyViewSupportTest.java | 6 +++--- .../test/tests/experiment/ExperimentAPITest.java | 13 +++++++------ .../test/tests/study/StudyDatasetDomainTest.java | 11 ++++++----- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/experiment/test/src/org/labkey/test/tests/experiment/ProvenanceAssayHelper.java b/experiment/test/src/org/labkey/test/tests/experiment/ProvenanceAssayHelper.java index 404c6348444..2165b894fd8 100644 --- a/experiment/test/src/org/labkey/test/tests/experiment/ProvenanceAssayHelper.java +++ b/experiment/test/src/org/labkey/test/tests/experiment/ProvenanceAssayHelper.java @@ -4,8 +4,9 @@ import org.labkey.remoteapi.CommandException; import org.labkey.remoteapi.Connection; import org.labkey.remoteapi.domain.CreateDomainCommand; +import org.labkey.remoteapi.domain.DomainDetailsResponse; import org.labkey.remoteapi.domain.DomainResponse; -import org.labkey.remoteapi.domain.GetDomainCommand; +import org.labkey.remoteapi.domain.GetDomainDetailsCommand; import org.labkey.remoteapi.domain.PropertyDescriptor; import org.labkey.remoteapi.query.SelectRowsCommand; import org.labkey.remoteapi.query.SelectRowsResponse; @@ -86,14 +87,14 @@ protected void populateAssay(String assayName, String runName, String runData) clickAndWait(Locator.lkButton("Save and Finish")); } - protected DomainResponse createDomain(String domainKind, String domainName, String description, List fields) throws IOException, CommandException + protected DomainDetailsResponse createDomain(String domainKind, String domainName, String description, List fields) throws IOException, CommandException { CreateDomainCommand domainCommand = new CreateDomainCommand(domainKind, domainName); domainCommand.getDomainDesign().setFields(fields); domainCommand.getDomainDesign().setDescription(description); DomainResponse domainResponse = domainCommand.execute(createDefaultConnection(), getProjectName()); - GetDomainCommand getDomainCommand = new GetDomainCommand(domainResponse.getDomain().getDomainId()); + GetDomainDetailsCommand getDomainCommand = new GetDomainDetailsCommand(domainResponse.getDomain().getDomainId()); return getDomainCommand.execute(createDefaultConnection(), getProjectName()); } diff --git a/experiment/test/src/org/labkey/test/tests/experiment/VocabularyViewSupportTest.java b/experiment/test/src/org/labkey/test/tests/experiment/VocabularyViewSupportTest.java index a0967812afc..d880944bd51 100644 --- a/experiment/test/src/org/labkey/test/tests/experiment/VocabularyViewSupportTest.java +++ b/experiment/test/src/org/labkey/test/tests/experiment/VocabularyViewSupportTest.java @@ -11,7 +11,7 @@ import org.labkey.remoteapi.assay.SaveAssayBatchCommand; import org.labkey.remoteapi.assay.SaveAssayRunsCommand; import org.labkey.remoteapi.assay.SaveAssayRunsResponse; -import org.labkey.remoteapi.domain.DomainResponse; +import org.labkey.remoteapi.domain.DomainDetailsResponse; import org.labkey.remoteapi.domain.PropertyDescriptor; import org.labkey.remoteapi.query.InsertRowsCommand; import org.labkey.remoteapi.query.SelectRowsCommand; @@ -111,7 +111,7 @@ public void testSampleSetViewSupport() throws IOException, CommandException fields.add(pd2); fields.add(pd3); - DomainResponse domainResponse = createDomain(domainKind, domainName, description, fields); + DomainDetailsResponse domainResponse = createDomain(domainKind, domainName, description, fields); int domainId = domainResponse.getDomain().getDomainId().intValue(); log("Create a sampleset"); @@ -224,7 +224,7 @@ public void testAssayViewSupport() throws IOException, CommandException fields.add(pd1); fields.add(pd2); - DomainResponse domainResponse = createDomain(domainKind, domainName, description, fields); + DomainDetailsResponse domainResponse = createDomain(domainKind, domainName, description, fields); int domainId = domainResponse.getDomain().getDomainId().intValue(); String domainProperty = domainName + domainId; diff --git a/study/test/src/org/labkey/test/tests/experiment/ExperimentAPITest.java b/study/test/src/org/labkey/test/tests/experiment/ExperimentAPITest.java index 568c63fa226..a760d45c132 100644 --- a/study/test/src/org/labkey/test/tests/experiment/ExperimentAPITest.java +++ b/study/test/src/org/labkey/test/tests/experiment/ExperimentAPITest.java @@ -39,8 +39,9 @@ import org.labkey.remoteapi.assay.SaveAssayRunsCommand; import org.labkey.remoteapi.assay.SaveAssayRunsResponse; import org.labkey.remoteapi.domain.CreateDomainCommand; +import org.labkey.remoteapi.domain.DomainDetailsResponse; import org.labkey.remoteapi.domain.DomainResponse; -import org.labkey.remoteapi.domain.GetDomainCommand; +import org.labkey.remoteapi.domain.GetDomainDetailsCommand; import org.labkey.remoteapi.domain.ListDomainsCommand; import org.labkey.remoteapi.domain.ListDomainsResponse; import org.labkey.remoteapi.domain.PropertyDescriptor; @@ -281,14 +282,14 @@ private Batch getBatch(Connection connection, int batchId) throws IOException, C return getResponse.getBatch(); } - private DomainResponse createDomain(String domainKind, String domainName, String description, List fields) throws IOException, CommandException + private DomainDetailsResponse createDomain(String domainKind, String domainName, String description, List fields) throws IOException, CommandException { CreateDomainCommand domainCommand = new CreateDomainCommand(domainKind, domainName); domainCommand.getDomainDesign().setDescription(description); domainCommand.getDomainDesign().setFields(fields); DomainResponse domainResponse = domainCommand.execute(createDefaultConnection(), getProjectName()); - GetDomainCommand getDomainCommand = new GetDomainCommand(domainResponse.getDomain().getDomainId()); + GetDomainDetailsCommand getDomainCommand = new GetDomainDetailsCommand(domainResponse.getDomain().getDomainId()); return getDomainCommand.execute(createDefaultConnection(), getProjectName()); } @@ -308,7 +309,7 @@ public void testSaveBatchWithAdHocProperties() throws IOException, CommandExcept fields.add(new PropertyDescriptor(prop1Name, prop1range)); fields.add(new PropertyDescriptor(prop2Name, prop2range)); - DomainResponse domainResponse = createDomain(domainKind, domainName, domainDescription,fields); + DomainDetailsResponse domainResponse = createDomain(domainKind, domainName, domainDescription,fields); //verifying properties got added in domainResponse assertEquals("First Adhoc property not found.", domainResponse.getDomain().getFields().get(0).getName(), prop1Name); @@ -347,7 +348,7 @@ public void testSaveRunApi() throws IOException, CommandException List fields = new ArrayList<>(); fields.add(new PropertyDescriptor(propertyName, rangeURI)); - DomainResponse domainResponse = createDomain(domainKind, domainName, domainDescription, fields); + DomainDetailsResponse domainResponse = createDomain(domainKind, domainName, domainDescription, fields); assertEquals("Property not added in Domain.", propertyName, domainResponse.getDomain().getFields().get(0).getName()); @@ -397,7 +398,7 @@ public void testImportRunWithAdhocProperties() throws IOException, CommandExcept String assayName = "ImportRunAssay"; // 1. Create Vocabulary Domain with one adhoc property with CreateDomainApi - DomainResponse domainResponse = createDomain(domainKind, domainName, domainDescription, List.of(new PropertyDescriptor(propertyName, rangeURI))); + DomainDetailsResponse domainResponse = createDomain(domainKind, domainName, domainDescription, List.of(new PropertyDescriptor(propertyName, rangeURI))); assertEquals("Property not added in Vocabulary Domain.", propertyName, domainResponse.getDomain().getFields().get(0).getName()); diff --git a/study/test/src/org/labkey/test/tests/study/StudyDatasetDomainTest.java b/study/test/src/org/labkey/test/tests/study/StudyDatasetDomainTest.java index f36c9a125d8..9be8cbd20b1 100644 --- a/study/test/src/org/labkey/test/tests/study/StudyDatasetDomainTest.java +++ b/study/test/src/org/labkey/test/tests/study/StudyDatasetDomainTest.java @@ -9,8 +9,9 @@ import org.labkey.remoteapi.PostCommand; import org.labkey.remoteapi.domain.CreateDomainCommand; import org.labkey.remoteapi.domain.Domain; +import org.labkey.remoteapi.domain.DomainDetailsResponse; import org.labkey.remoteapi.domain.DomainResponse; -import org.labkey.remoteapi.domain.GetDomainCommand; +import org.labkey.remoteapi.domain.GetDomainDetailsCommand; import org.labkey.remoteapi.domain.PropertyDescriptor; import org.labkey.remoteapi.domain.SaveDomainCommand; import org.labkey.test.BaseWebDriverTest; @@ -135,8 +136,8 @@ public void updateDomainErrorsTest() throws Exception renameColumnName(); log("Test for an expected error when changing type from String to Int"); - GetDomainCommand getCmd = new GetDomainCommand(STUDY_SCHEMA, STUDY_DATASET_NAME); - DomainResponse getDomainResponse = getCmd.execute(this.createDefaultConnection(), getContainerPath()); + GetDomainDetailsCommand getCmd = new GetDomainDetailsCommand(STUDY_SCHEMA, STUDY_DATASET_NAME); + DomainDetailsResponse getDomainResponse = getCmd.execute(this.createDefaultConnection(), getContainerPath()); List getDomainCols = getDomainResponse.getDomain().getFields(); PropertyDescriptor activityCodeCol = getDomainCols.get(3); @@ -163,8 +164,8 @@ public void updateDomainErrorsTest() throws Exception private void renameColumnName() throws IOException, CommandException { - GetDomainCommand getCmd = new GetDomainCommand(STUDY_SCHEMA, STUDY_DATASET_NAME); - DomainResponse getDomainResponse = getCmd.execute(this.createDefaultConnection(), getContainerPath()); + GetDomainDetailsCommand getCmd = new GetDomainDetailsCommand(STUDY_SCHEMA, STUDY_DATASET_NAME); + DomainDetailsResponse getDomainResponse = getCmd.execute(this.createDefaultConnection(), getContainerPath()); List getDomainCols = getDomainResponse.getDomain().getFields(); PropertyDescriptor activityCommentsCol = getDomainCols.get(3); From 7eeedfb6e729114e2ffd6232605523bfeb1a58b6 Mon Sep 17 00:00:00 2001 From: RosalineP Date: Thu, 11 Jan 2024 15:19:56 -0800 Subject: [PATCH 4/4] Language Consistency (#5109) --- core/package-lock.json | 14 +++++++------- core/package.json | 2 +- .../org/labkey/list/model/ListManagerTable.java | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 02639a15273..974d4e943a4 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -8,7 +8,7 @@ "name": "labkey-core", "version": "0.0.0", "dependencies": { - "@labkey/components": "3.5.0", + "@labkey/components": "3.5.3", "@labkey/themes": "1.3.3" }, "devDependencies": { @@ -3339,9 +3339,9 @@ } }, "node_modules/@labkey/components": { - "version": "3.5.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-3.5.0.tgz", - "integrity": "sha512-CZ5G8dRyhTiEn5mDVtnkQlopsz1RAAG1h9c1wg/5Tfbrybz+BOOIQSbIGKW+hBoTEhfjkKOHlZQo7LLfiUVmWw==", + "version": "3.5.3", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-3.5.3.tgz", + "integrity": "sha512-FL51evz8lo5eQ9Hul+IS0hN7MTU1xbR9TDVjkJq5W/8CV+iscxcDTfqB9YmV/3JW3nJ4LCwOVXGuwPGiUMZF7A==", "dependencies": { "@labkey/api": "1.28.0", "@testing-library/jest-dom": "~5.17.0", @@ -19555,9 +19555,9 @@ } }, "@labkey/components": { - "version": "3.5.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-3.5.0.tgz", - "integrity": "sha512-CZ5G8dRyhTiEn5mDVtnkQlopsz1RAAG1h9c1wg/5Tfbrybz+BOOIQSbIGKW+hBoTEhfjkKOHlZQo7LLfiUVmWw==", + "version": "3.5.3", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-3.5.3.tgz", + "integrity": "sha512-FL51evz8lo5eQ9Hul+IS0hN7MTU1xbR9TDVjkJq5W/8CV+iscxcDTfqB9YmV/3JW3nJ4LCwOVXGuwPGiUMZF7A==", "requires": { "@labkey/api": "1.28.0", "@testing-library/jest-dom": "~5.17.0", diff --git a/core/package.json b/core/package.json index 222cec9edbd..477ba8e6c89 100644 --- a/core/package.json +++ b/core/package.json @@ -54,7 +54,7 @@ } }, "dependencies": { - "@labkey/components": "3.5.0", + "@labkey/components": "3.5.3", "@labkey/themes": "1.3.3" }, "devDependencies": { diff --git a/list/src/org/labkey/list/model/ListManagerTable.java b/list/src/org/labkey/list/model/ListManagerTable.java index b2921eb1433..611156862f0 100644 --- a/list/src/org/labkey/list/model/ListManagerTable.java +++ b/list/src/org/labkey/list/model/ListManagerTable.java @@ -89,9 +89,9 @@ public Object getValue(RenderContext ctx) String category = (String) super.getValue(ctx); if (ListDefinition.Category.PublicPicklist.toString().equals(category)) - return "public"; + return "Yes"; else if (ListDefinition.Category.PrivatePicklist.toString().equals(category)) - return "private"; + return "No"; return null; }