Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions api/gwtsrc/org/labkey/api/gwt/client/model/GWTDomain.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public class GWTDomain<FieldType extends GWTPropertyDescriptor> implements IsSer
@Getter @Setter private String container;
@Getter @Setter private boolean allowFileLinkProperties;
@Getter @Setter private boolean allowAttachmentProperties;
@Getter @Setter private boolean allowFlagProperties;
@Getter @Setter private boolean allowTextChoiceProperties;
@Getter @Setter private boolean allowMultiChoiceProperties;
@Getter @Setter private boolean allowSampleSubjectProperties;
Expand Down Expand Up @@ -89,7 +88,6 @@ public GWTDomain(GWTDomain<FieldType> src)
this.container = src.container;
this.allowFileLinkProperties = src.allowFileLinkProperties;
this.allowAttachmentProperties = src.allowAttachmentProperties;
this.allowFlagProperties = src.allowFlagProperties;
this.allowTextChoiceProperties = src.allowTextChoiceProperties;
this.allowMultiChoiceProperties = src.allowMultiChoiceProperties;
this.allowSampleSubjectProperties = src.allowSampleSubjectProperties;
Expand Down
1 change: 0 additions & 1 deletion api/gwtsrc/org/labkey/api/gwt/client/ui/PropertyType.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public enum PropertyType
xsdTime("http://www.w3.org/2001/XMLSchema#time", true, "Time", null, "time"),
expFileLink("http://cpas.fhcrc.org/exp/xml#fileLink", false, "File"),
expAttachment("http://www.labkey.org/exp/xml#attachment", false, "Attachment"),
expFlag("http://www.labkey.org/exp/xml#flag", false, "Flag (String)"),
xsdFloat("http://www.w3.org/2001/XMLSchema#float", true, "Number (Float)", "Float", "float"),
xsdDecimal("http://www.w3.org/2001/XMLSchema#decimal", true, "Number (Decimal)", "Decimal", "float"),
xsdLong("http://www.w3.org/2001/XMLSchema#long", true, "Long Integer", "Long", "int"),
Expand Down
6 changes: 0 additions & 6 deletions api/src/org/labkey/api/assay/AbstractAssayProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -1688,12 +1688,6 @@ public Pair<ExpProtocol, Integer> getAssayResultRowIdFromLsid(Container containe
return Pair.of(protocol, rowId);
}

@Override
public boolean supportsFlagColumnType(ExpProtocol.AssayDomainTypes type)
{
return false;
}

@Override
public Module getDeclaringModule()
{
Expand Down
4 changes: 1 addition & 3 deletions api/src/org/labkey/api/assay/AssayProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import org.jetbrains.annotations.Nullable;
import org.labkey.api.assay.actions.AssayRunUploadForm;
import org.labkey.api.assay.pipeline.AssayRunAsyncContext;
import org.labkey.api.assay.plate.FilterCriteria;
import org.labkey.api.assay.transform.AnalysisScript;
import org.labkey.api.assay.transform.DataExchangeHandler;
import org.labkey.api.assay.plate.FilterCriteria;
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerFilter;
import org.labkey.api.exp.ExperimentException;
Expand Down Expand Up @@ -331,8 +331,6 @@ enum Scope

void registerLsidHandler();

boolean supportsFlagColumnType(ExpProtocol.AssayDomainTypes type);

/**@ return the module in which this assay provider is declared */
Module getDeclaringModule();

Expand Down
1 change: 0 additions & 1 deletion api/src/org/labkey/api/assay/AssayUrls.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public interface AssayUrls extends UrlProvider
ActionURL getUpdateQCStateURL(Container container, ExpProtocol protocol);

ActionURL getBeginURL(Container container);
ActionURL getSetResultFlagURL(Container container);
ActionURL getChooseAssayTypeURL(Container container);
ActionURL getImportAssayDesignURL(Container container);
ActionURL getShowSelectedDataURL(Container container, ExpProtocol protocol);
Expand Down
7 changes: 1 addition & 6 deletions api/src/org/labkey/api/exp/PropertyDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,7 @@ public Map<String, Object> getAuditRecordMap(@Nullable String validatorStr, @Nul
if (!StringUtils.isEmpty(getLabel()))
map.put("Label", getLabel());
if (null != getPropertyType())
{
if (org.labkey.api.gwt.client.ui.PropertyType.expFlag.getURI().equals(getConceptURI()))
map.put("Type", "Flag");
else
map.put("Type", getPropertyType().getXarName());
}
map.put("Type", getPropertyType().getXarName());
if (getPropertyType().getJdbcType().isText())
map.put("Scale", getScale());
if (!StringUtils.isEmpty(getDescription()))
Expand Down
1 change: 0 additions & 1 deletion api/src/org/labkey/api/exp/property/DomainKind.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ public boolean matchesTemplateXML(String templateName, DomainTemplateType templa

public boolean allowFileLinkProperties() { return false; }
public boolean allowAttachmentProperties() { return false; }
public boolean allowFlagProperties() { return true; }
public boolean allowTextChoiceProperties() { return true; }
public boolean allowMultiChoiceProperties() { return false; }
public boolean allowSampleSubjectProperties() { return true; }
Expand Down
2 changes: 0 additions & 2 deletions api/src/org/labkey/api/exp/property/DomainUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ private static GWTDomain<GWTPropertyDescriptor> getDomain(Domain dd)
{
gwtDomain.setAllowAttachmentProperties(kind.allowAttachmentProperties());
gwtDomain.setAllowFileLinkProperties(kind.allowFileLinkProperties());
gwtDomain.setAllowFlagProperties(kind.allowFlagProperties());
gwtDomain.setAllowTextChoiceProperties(kind.allowTextChoiceProperties());
gwtDomain.setAllowMultiChoiceProperties(allowMultiChoice(kind));
gwtDomain.setAllowSampleSubjectProperties(kind.allowSampleSubjectProperties());
Expand All @@ -478,7 +477,6 @@ public static GWTDomain<GWTPropertyDescriptor> getTemplateDomainForDomainKind(Do
gwtDomain.setDomainKindName(kind.getKindName());
gwtDomain.setAllowAttachmentProperties(kind.allowAttachmentProperties());
gwtDomain.setAllowFileLinkProperties(kind.allowFileLinkProperties());
gwtDomain.setAllowFlagProperties(kind.allowFlagProperties());
gwtDomain.setAllowTextChoiceProperties(kind.allowTextChoiceProperties());
gwtDomain.setAllowMultiChoiceProperties(allowMultiChoice(kind));
gwtDomain.setAllowSampleSubjectProperties(kind.allowSampleSubjectProperties());
Expand Down
8 changes: 4 additions & 4 deletions assay/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 assay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"clean": "rimraf resources/web/assay/gen && rimraf resources/views/gen && rimraf resources/web/gen"
},
"dependencies": {
"@labkey/components": "7.20.1"
"@labkey/components": "7.20.1-fb-remove-flag-field.0"
},
"devDependencies": {
"@labkey/build": "8.8.0",
Expand Down
69 changes: 0 additions & 69 deletions assay/src/org/labkey/assay/AssayController.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.labkey.assay;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
Expand All @@ -42,7 +41,6 @@
import org.labkey.api.assay.AssayProtocolSchema;
import org.labkey.api.assay.AssayProvider;
import org.labkey.api.assay.AssayQCService;
import org.labkey.api.assay.AssayResultTable;
import org.labkey.api.assay.AssayRunsView;
import org.labkey.api.assay.AssaySchema;
import org.labkey.api.assay.AssayService;
Expand Down Expand Up @@ -75,12 +73,10 @@
import org.labkey.api.data.ContainerFilter;
import org.labkey.api.data.ContainerManager;
import org.labkey.api.data.DataRegionSelection;
import org.labkey.api.data.DbScope;
import org.labkey.api.data.DisplayColumn;
import org.labkey.api.data.JsonWriter;
import org.labkey.api.data.MutableColumnInfo;
import org.labkey.api.data.SimpleFilter;
import org.labkey.api.data.Table;
import org.labkey.api.data.TableInfo;
import org.labkey.api.data.TableSelector;
import org.labkey.api.defaults.DefaultValueService;
Expand Down Expand Up @@ -1212,12 +1208,6 @@ public ActionURL getBeginURL(Container container)
return new ActionURL(BeginAction.class, container);
}

@Override
public ActionURL getSetResultFlagURL(Container container)
{
return new ActionURL(SetResultFlagAction.class, container);
}

@Override
public ActionURL getChooseAssayTypeURL(Container container)
{
Expand Down Expand Up @@ -1372,65 +1362,6 @@ public List<Integer> getRowList()
}
}


/**
* This is different from ExperimentController$SetFlagAction since Result Rows are not ExpObjects,
* and we store flag directly in the materialized table
*/
@RequiresPermission(UpdatePermission.class)
public static class SetResultFlagAction extends MutatingApiAction<SetResultFlagForm>
{
@Override
protected @NotNull SetResultFlagForm getCommand(HttpServletRequest request)
{
return new SetResultFlagForm();
}

@Override
public ApiResponse execute(SetResultFlagForm form, BindException errors)
{
form.setContainer(getContainer());
ExpProtocol protocol = form.getProtocol();
String tableName = AssayProtocolSchema.DATA_TABLE_NAME;
AssaySchema schema = form.getProvider().createProtocolSchema(getUser(), getContainer(), protocol, null);
TableInfo table = schema.getTable(tableName);
if (!(table instanceof AssayResultTable assayResultTable))
throw new NotFoundException();
if (null == form.getColumnName())
throw new NotFoundException();
TableInfo ti = assayResultTable.getSchemaTableInfo();
String comment = StringUtils.trimToNull(form.getComment());

ColumnInfo flagCol = assayResultTable.getColumn(form.getColumnName());
if (null == form.getColumnName())
throw new NotFoundException();
if (!org.labkey.api.gwt.client.ui.PropertyType.expFlag.getURI().equals(flagCol.getConceptURI()))
throw new NotFoundException();

DbScope scope = ti.getSchema().getScope();
int rowsAffected = 0 ;
try (DbScope.Transaction transaction = scope.ensureTransaction())
{
for (Integer id : form.getRowList())
{
// assuming that column in storage table has same name
Map<String, Object> flagComment = new HashMap<>();
flagComment.put(flagCol.getColumnName(), comment);
Table.update(getUser(), ti, flagComment, id);
rowsAffected++;
}
transaction.commit();
}

// the flag is editable even if the assay is not
JSONObject res = new JSONObject();
res.put("success", true);
res.put("comment", form.getComment());
res.put("rowsAffected", rowsAffected);
return new ApiSimpleResponse(res);
}
}

@RequiresPermission(AssayReadPermission.class)
public static class GetQCStateAction extends ReadOnlyApiAction<Object>
{
Expand Down
3 changes: 0 additions & 3 deletions assay/src/org/labkey/assay/AssayDomainServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@ private List<GWTDomain<GWTPropertyDescriptor>> getDomains(
gwtDomain.setFields(fields);
gwtDomain.setMandatoryFieldNames(mandatoryPropertyDescriptors);

if (isResultsDomain)
gwtDomain.setAllowFlagProperties(provider.supportsFlagColumnType(ExpProtocol.AssayDomainTypes.Result));

gwtDomains.add(gwtDomain);
}

Expand Down
Loading