Skip to content

Commit

Permalink
Merge branch 'develop' into fb_dashboardChartDataExclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
cnathe committed Jan 12, 2024
2 parents 8957809 + 7eeedfb commit 3a0ad25
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 29 deletions.
2 changes: 1 addition & 1 deletion api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
14 changes: 7 additions & 7 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
},
"dependencies": {
"@labkey/components": "3.5.0",
"@labkey/components": "3.5.3",
"@labkey/themes": "1.3.3"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<PropertyDescriptor> fields) throws IOException, CommandException
protected DomainDetailsResponse createDomain(String domainKind, String domainName, String description, List<PropertyDescriptor> 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());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions list/src/org/labkey/list/model/ListManagerTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<PropertyDescriptor> fields) throws IOException, CommandException
private DomainDetailsResponse createDomain(String domainKind, String domainName, String description, List<PropertyDescriptor> 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());
}

Expand All @@ -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);
Expand Down Expand Up @@ -347,7 +348,7 @@ public void testSaveRunApi() throws IOException, CommandException
List<PropertyDescriptor> 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());

Expand Down Expand Up @@ -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());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<PropertyDescriptor> getDomainCols = getDomainResponse.getDomain().getFields();
PropertyDescriptor activityCodeCol = getDomainCols.get(3);

Expand All @@ -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<PropertyDescriptor> getDomainCols = getDomainResponse.getDomain().getFields();
PropertyDescriptor activityCommentsCol = getDomainCols.get(3);

Expand Down

0 comments on commit 3a0ad25

Please sign in to comment.