From 2f387e6432d5c5ac25ce5c4d7ea5519fbbcd972e Mon Sep 17 00:00:00 2001 From: Lum Date: Tue, 2 Dec 2025 09:50:13 -0800 Subject: [PATCH 1/3] Remove the dataset import history and related code. --- .gitattributes | 1 - .../postgresql/study-25.003-25.004.sql | 1 + .../sqlserver/study-25.003-25.004.sql | 1 + study/resources/schemas/study.xml | 12 -- study/src/org/labkey/study/StudyModule.java | 2 - study/src/org/labkey/study/StudySchema.java | 5 - .../study/assay/StudyPublishManager.java | 111 +-------------- .../study/controllers/StudyController.java | 74 +--------- .../dataset/DatasetSnapshotProvider.java | 6 +- .../labkey/study/model/DatasetDefinition.java | 6 +- .../org/labkey/study/model/StudyManager.java | 4 +- .../src/org/labkey/study/model/UploadLog.java | 129 ------------------ .../org/labkey/study/view/datasetDetails.jsp | 12 +- 13 files changed, 17 insertions(+), 347 deletions(-) create mode 100644 study/resources/schemas/dbscripts/postgresql/study-25.003-25.004.sql create mode 100644 study/resources/schemas/dbscripts/sqlserver/study-25.003-25.004.sql delete mode 100644 study/src/org/labkey/study/model/UploadLog.java diff --git a/.gitattributes b/.gitattributes index 1bc08402256..ea70d093fca 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2667,7 +2667,6 @@ study/src/org/labkey/study/model/StudyImpl.java -text study/src/org/labkey/study/model/StudyLsidHandler.java -text study/src/org/labkey/study/model/StudyManager.java -text study/src/org/labkey/study/model/StudySnapshot.java -text -study/src/org/labkey/study/model/UploadLog.java -text study/src/org/labkey/study/model/VisitDataset.java -text study/src/org/labkey/study/model/VisitDatasetType.java -text study/src/org/labkey/study/model/VisitImpl.java -text diff --git a/study/resources/schemas/dbscripts/postgresql/study-25.003-25.004.sql b/study/resources/schemas/dbscripts/postgresql/study-25.003-25.004.sql new file mode 100644 index 00000000000..b644bdb0ad1 --- /dev/null +++ b/study/resources/schemas/dbscripts/postgresql/study-25.003-25.004.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS study.UploadLog; diff --git a/study/resources/schemas/dbscripts/sqlserver/study-25.003-25.004.sql b/study/resources/schemas/dbscripts/sqlserver/study-25.003-25.004.sql new file mode 100644 index 00000000000..b644bdb0ad1 --- /dev/null +++ b/study/resources/schemas/dbscripts/sqlserver/study-25.003-25.004.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS study.UploadLog; diff --git a/study/resources/schemas/study.xml b/study/resources/schemas/study.xml index 111119162cd..a4ba859b9e7 100644 --- a/study/resources/schemas/study.xml +++ b/study/resources/schemas/study.xml @@ -1564,18 +1564,6 @@ - - - - - - - - - - - -
Contains one row per subject/visit combination in the study. Note that this table is populated dynamically as specimen, assay, and dataset data are loaded, and is guaranteed to always be complete. diff --git a/study/src/org/labkey/study/StudyModule.java b/study/src/org/labkey/study/StudyModule.java index 8df47d6aa96..a32ffb679fc 100644 --- a/study/src/org/labkey/study/StudyModule.java +++ b/study/src/org/labkey/study/StudyModule.java @@ -391,8 +391,6 @@ protected void startupAfterSpringConfig(ModuleContext moduleContext) folderRegistry.addFactories(new StudyWriterFactory(), new StudyImporterFactory()); } - FileContentService.get().addFileListener(new TableUpdaterFileListener(StudySchema.getInstance().getTableInfoUploadLog(), "FilePath", TableUpdaterFileListener.Type.filePath, "RowId")); - DatasetDefinition.cleanupOrphanedDatasetDomains(); OptionalFeatureService.get().addExperimentalFeatureFlag(StudyQuerySchema.EXPERIMENTAL_STUDY_SUBSCHEMAS, "Use sub-schemas in Study", diff --git a/study/src/org/labkey/study/StudySchema.java b/study/src/org/labkey/study/StudySchema.java index 1e1296dea84..66a63a43b0c 100644 --- a/study/src/org/labkey/study/StudySchema.java +++ b/study/src/org/labkey/study/StudySchema.java @@ -128,11 +128,6 @@ public TableInfo getTableInfoParticipantVisit() return getSchema().getTable("ParticipantVisit"); } - public TableInfo getTableInfoUploadLog() - { - return getSchema().getTable("UploadLog"); - } - public TableInfo getTableInfoCohort() { return getSchema().getTable("Cohort"); diff --git a/study/src/org/labkey/study/assay/StudyPublishManager.java b/study/src/org/labkey/study/assay/StudyPublishManager.java index d4a2cc2c894..677600a51b9 100644 --- a/study/src/org/labkey/study/assay/StudyPublishManager.java +++ b/study/src/org/labkey/study/assay/StudyPublishManager.java @@ -18,13 +18,11 @@ import org.apache.commons.beanutils.ConvertUtils; import org.apache.commons.collections4.MapUtils; -import org.apache.commons.io.IOUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.labkey.api.assay.AbstractAssayProvider; -import org.labkey.api.assay.AssayFileWriter; import org.labkey.api.assay.AssayProtocolSchema; import org.labkey.api.assay.AssayProvider; import org.labkey.api.assay.AssayService; @@ -113,9 +111,7 @@ import org.labkey.api.study.publish.StudyDatasetLinkedColumn; import org.labkey.api.study.publish.StudyPublishService; import org.labkey.api.study.query.PublishResultsQueryView; -import org.labkey.api.util.DateUtil; import org.labkey.api.util.FileStream; -import org.labkey.api.util.FileUtil; import org.labkey.api.util.PageFlowUtil; import org.labkey.api.util.Pair; import org.labkey.api.util.StringExpressionFactory; @@ -134,16 +130,12 @@ import org.labkey.study.model.DatasetDomainKind; import org.labkey.study.model.StudyImpl; import org.labkey.study.model.StudyManager; -import org.labkey.study.model.UploadLog; import org.labkey.study.query.StudyQuerySchema; import org.springframework.beans.MutablePropertyValues; import java.io.Closeable; import java.io.IOException; -import java.io.OutputStream; import java.math.BigDecimal; -import java.nio.file.Files; -import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -179,12 +171,6 @@ public synchronized static StudyPublishManager getInstance() return (StudyPublishManager) StudyPublishService.get(); } - - private TableInfo getTinfoUpdateLog() - { - return StudySchema.getInstance().getTableInfoUploadLog(); - } - /** * Studies that the user has permission to. */ @@ -932,71 +918,16 @@ private static String createUniqueDatasetName(Study study, String assayName) return name; } - public UploadLog saveUploadData(User user, Dataset dsd, FileStream tsv, String filename) throws IOException - { - PipeRoot pipelineRoot = PipelineService.get().findPipelineRoot(dsd.getContainer()); - if (null == pipelineRoot || !pipelineRoot.isValid()) - throw new IOException("Please have your administrator set up a pipeline root for this folder."); - - Path dir = pipelineRoot.resolveToNioPath(AssayFileWriter.DIR_NAME); - if (null == dir) - throw new IOException("Cannot create directory uploaded data: " + AssayFileWriter.DIR_NAME); - - if (!Files.exists(dir)) - { - FileUtil.createDirectory(dir); - } - - //File name is studyname_datasetname_date_hhmm.ss - Date dateCreated = new Date(); - String dateString = DateUtil.formatDateTime(dateCreated, "yyy-MM-dd-HHmm"); - int id = 0; - Path file; - do - { - String extension = Objects.toString(filename == null ? "tsv" : FileUtil.getExtension(filename), "tsv"); - String extra = id++ == 0 ? "" : String.valueOf(id); - String fileName = dsd.getStudy().getLabel() + "-" + dsd.getLabel() + "-" + dateString + extra + "." + extension; - fileName = fileName.replace('\\', '_').replace('/', '_').replace(':', '_'); - file = FileUtil.appendName(dir, fileName); - } - while (Files.exists(file)); - - try (OutputStream out = Files.newOutputStream(file)) - { - IOUtils.copy(tsv.openInputStream(), out); - tsv.closeInputStream(); - } - - UploadLog ul = new UploadLog(); - ul.setContainer(dsd.getContainer()); - ul.setDatasetId(dsd.getDatasetId()); - ul.setCreated(dateCreated); - ul.setUserId(user.getUserId()); - ul.setStatus("Initializing"); - String filePath = FileUtil.hasCloudScheme(file) ? FileUtil.pathToString(file) : file.toFile().getPath(); - ul.setFilePath(filePath); - - return Table.insert(user, getTinfoUpdateLog(), ul); - } - - /** - * Return an array of LSIDs from the newly created dataset entries, - * along with the upload log. + * Return an array of LSIDs from the newly created dataset entries. */ - public Pair, UploadLog> importDatasetTSV(User user, StudyImpl study, DatasetDefinition dsd, DataLoader dl, LookupResolutionType lookupResolutionType, FileStream fileIn, String originalFileName, Map columnMap, BatchValidationException errors, QueryUpdateService.InsertOption insertOption, @Nullable AuditBehaviorType auditBehaviorType) + public List importDatasetTSV(User user, StudyImpl study, DatasetDefinition dsd, DataLoader dl, LookupResolutionType lookupResolutionType, FileStream fileIn, String originalFileName, Map columnMap, BatchValidationException errors, QueryUpdateService.InsertOption insertOption, @Nullable AuditBehaviorType auditBehaviorType) { DbScope scope = StudySchema.getInstance().getScope(); - - UploadLog ul = null; List lsids = Collections.emptyList(); try { - if (null != fileIn) - ul = saveUploadData(user, dsd, fileIn, originalFileName); - try (DbScope.Transaction transaction = scope.ensureTransaction()) { Long defaultQCStateId = study.getDefaultDirectEntryQCState(); @@ -1020,45 +951,9 @@ public Pair, UploadLog> importDatasetTSV(User user, StudyImpl study catch (IOException x) { errors.addRowError(new ValidationException("Exception: " + x.getMessage())); - if (ul != null) - { - ul.setStatus("ERROR"); - String description = ul.getDescription(); - ul.setDescription(description == null ? "" : description + "\n" + new Date() + ":" + x.getMessage()); - ul = Table.update(user, StudySchema.getInstance().getTableInfoUploadLog(), ul, ul.getRowId()); - return Pair.of(lsids, ul); - } } - if (!errors.hasErrors()) - { - //Update the status - assert ul != null : "Upload log should always exist if no errors have occurred."; - ul.setStatus("SUCCESS"); - ul = Table.update(user, getTinfoUpdateLog(), ul, ul.getRowId()); - } - else if (ul != null) - { - ul.setStatus("ERROR"); - StringBuilder sb = new StringBuilder(); - String sep = ""; - for (ValidationException e : errors.getRowErrors()) - { - sb.append(sep).append(e.getMessage()); - sep = "\n"; - } - ul.setDescription(sb.toString()); - ul = Table.update(user, getTinfoUpdateLog(), ul, ul.getRowId()); - } - return Pair.of(lsids, ul); - } - - public UploadLog getUploadLog(Container c, int id) - { - SimpleFilter filter = SimpleFilter.createContainerFilter(c); - filter.addCondition(FieldKey.fromParts("rowId"), id); - - return new TableSelector(getTinfoUpdateLog(), filter, null).getObject(UploadLog.class); + return lsids; } @Override diff --git a/study/src/org/labkey/study/controllers/StudyController.java b/study/src/org/labkey/study/controllers/StudyController.java index 4cd599b94ee..551b1362b0e 100644 --- a/study/src/org/labkey/study/controllers/StudyController.java +++ b/study/src/org/labkey/study/controllers/StudyController.java @@ -90,7 +90,6 @@ import org.labkey.api.data.RuntimeSQLException; import org.labkey.api.data.SQLFragment; import org.labkey.api.data.ShowRows; -import org.labkey.api.data.SimpleDisplayColumn; import org.labkey.api.data.SimpleFilter; import org.labkey.api.data.Sort; import org.labkey.api.data.SqlExecutor; @@ -210,7 +209,6 @@ import org.labkey.api.util.XmlBeansUtil; import org.labkey.api.view.ActionURL; import org.labkey.api.view.DataView; -import org.labkey.api.view.GridView; import org.labkey.api.view.HtmlView; import org.labkey.api.view.HttpView; import org.labkey.api.view.JspView; @@ -227,7 +225,6 @@ import org.labkey.api.view.template.EmptyView; import org.labkey.api.view.template.PageConfig; import org.labkey.api.writer.FileSystemFile; -import org.labkey.api.writer.HtmlWriter; import org.labkey.api.writer.VirtualFile; import org.labkey.data.xml.TablesDocument; import org.labkey.study.CohortFilterFactory; @@ -265,7 +262,6 @@ import org.labkey.study.model.StudyImpl; import org.labkey.study.model.StudyManager; import org.labkey.study.model.StudySnapshot; -import org.labkey.study.model.UploadLog; import org.labkey.study.model.VisitDataset; import org.labkey.study.model.VisitDatasetType; import org.labkey.study.model.VisitImpl; @@ -2712,19 +2708,19 @@ protected int importData(DataLoader dl, FileStream file, String originalName, Ba columnMap.put(_form.getSequenceNum(), column); } - Pair, UploadLog> result = StudyPublishManager.getInstance().importDatasetTSV(getUser(), _study, _def, dl, getLookupResolutionType(), file, originalName, columnMap, errors, _form.getInsertOption(), auditBehaviorType); + List lsids = StudyPublishManager.getInstance().importDatasetTSV(getUser(), _study, _def, dl, getLookupResolutionType(), file, originalName, columnMap, errors, _form.getInsertOption(), auditBehaviorType); - if (!result.getKey().isEmpty()) + if (!lsids.isEmpty()) { // Log the import when SUMMARY is configured, if DETAILED is configured the DetailedAuditLogDataIterator will handle each row change. // It would be nice in the future to replace the DetailedAuditLogDataIterator with a general purpose AuditLogDataIterator // that can delegate the audit behavior type to the AuditDataHandler, so this code can go away // - String comment = "Dataset data imported. " + result.getKey().size() + " rows imported"; - new DatasetDefinition.DatasetAuditHandler(_def).addAuditEvent(getUser(), getContainer(), AuditBehaviorType.SUMMARY, comment, result.getValue()); + String comment = "Dataset data imported. " + lsids.size() + " rows imported"; + new DatasetDefinition.DatasetAuditHandler(_def).addAuditEvent(getUser(), getContainer(), AuditBehaviorType.SUMMARY, comment); } - return result.getKey().size(); + return lsids.size(); } @Override @@ -2843,66 +2839,6 @@ public void setManifest(String manifest) } } - @RequiresPermission(UpdatePermission.class) - public class ShowUploadHistoryAction extends SimpleViewAction - { - String _datasetLabel; - - @Override - public ModelAndView getView(IdForm form, BindException errors) - { - TableInfo tInfo = StudySchema.getInstance().getTableInfoUploadLog(); - DataRegion dr = new DataRegion(); - dr.addColumns(tInfo, "RowId,Created,CreatedBy,Status,Description"); - GridView gv = new GridView(dr, errors); - DisplayColumn dc = new SimpleDisplayColumn(null) { - @Override - public void renderGridCellContents(RenderContext ctx, HtmlWriter out) - { - ActionURL url = new ActionURL(DownloadTsvAction.class, ctx.getContainer()).addParameter("id", String.valueOf(ctx.get("RowId"))); - out.write(LinkBuilder.labkeyLink("Download Data File", url)); - } - }; - dr.addDisplayColumn(dc); - - SimpleFilter filter = SimpleFilter.createContainerFilter(getContainer()); - if (form.getId() != 0) - { - filter.addCondition(Dataset.DATASET_KEY, form.getId()); - DatasetDefinition dsd = StudyManager.getInstance().getDatasetDefinition(getStudyRedirectIfNull(), form.getId()); - if (dsd != null) - _datasetLabel = dsd.getLabel(); - } - - gv.setFilter(filter); - return gv; - } - - @Override - public void addNavTrail(NavTree root) - { - root.addChild("Upload History" + (null != _datasetLabel ? " for " + _datasetLabel : "")); - } - } - - @RequiresPermission(UpdatePermission.class) - public static class DownloadTsvAction extends SimpleViewAction - { - @Override - public ModelAndView getView(IdForm form, BindException errors) throws Exception - { - UploadLog ul = StudyPublishManager.getInstance().getUploadLog(getContainer(), form.getId()); - PageFlowUtil.streamFile(getViewContext().getResponse(), new File(ul.getFilePath()).toPath(), true); - - return null; - } - - @Override - public void addNavTrail(NavTree root) - { - } - } - @RequiresPermission(ReadPermission.class) public static class DatasetItemDetailsAction extends SimpleViewAction { diff --git a/study/src/org/labkey/study/dataset/DatasetSnapshotProvider.java b/study/src/org/labkey/study/dataset/DatasetSnapshotProvider.java index 435c41ae701..a75d69d22a0 100644 --- a/study/src/org/labkey/study/dataset/DatasetSnapshotProvider.java +++ b/study/src/org/labkey/study/dataset/DatasetSnapshotProvider.java @@ -487,7 +487,7 @@ public synchronized ActionURL updateSnapshot(QuerySnapshotForm form, BindExcepti ViewContext context = form.getViewContext(); new DatasetDefinition.DatasetAuditHandler(dsDef).addAuditEvent(context.getUser(), context.getContainer(), AuditBehaviorType.DETAILED, - "Dataset snapshot was updated. " + numRowsDeleted + " rows were removed and replaced with " + newRows.size() + " rows.", null); + "Dataset snapshot was updated. " + numRowsDeleted + " rows were removed and replaced with " + newRows.size() + " rows."); def.setLastUpdated(new Date()); def.save(form.getViewContext().getUser()); @@ -504,7 +504,7 @@ public synchronized ActionURL updateSnapshot(QuerySnapshotForm form, BindExcepti { ViewContext context = form.getViewContext(); new DatasetDefinition.DatasetAuditHandler(dsDef).addAuditEvent(context.getUser(), context.getContainer(), AuditBehaviorType.DETAILED, - "Dataset snapshot was not updated. Cause of failure: " + e.getMessage(), null); + "Dataset snapshot was not updated. Cause of failure: " + e.getMessage()); } } } @@ -791,7 +791,7 @@ public void run() DatasetDefinition dsDef = StudyManager.getInstance().getDatasetDefinitionByName(study, _def.getName()); if (dsDef != null) new DatasetDefinition.DatasetAuditHandler(dsDef).addAuditEvent(context.getUser(), context.getContainer(), AuditBehaviorType.DETAILED, - "Dataset snapshot was not updated. Cause of failure: " + errors.getMessage(), null); + "Dataset snapshot was not updated. Cause of failure: " + errors.getMessage()); } } } diff --git a/study/src/org/labkey/study/model/DatasetDefinition.java b/study/src/org/labkey/study/model/DatasetDefinition.java index 387169c205c..988db2c448a 100644 --- a/study/src/org/labkey/study/model/DatasetDefinition.java +++ b/study/src/org/labkey/study/model/DatasetDefinition.java @@ -1843,7 +1843,7 @@ else if (existingRecord != null && !existingRecord.isEmpty()) * @param requiredAuditType The expected audit behavior type. If this does not match the type set on the * dataset, then the event will not be logged. */ - public void addAuditEvent(User user, Container c, AuditBehaviorType requiredAuditType, String comment, @Nullable UploadLog ul) + public void addAuditEvent(User user, Container c, AuditBehaviorType requiredAuditType, String comment) { TableInfo table = _dataset.getTableInfo(user); @@ -1851,10 +1851,6 @@ public void addAuditEvent(User user, Container c, AuditBehaviorType requiredAudi return; DatasetAuditProvider.DatasetAuditEvent event = new DatasetAuditProvider.DatasetAuditEvent(c, comment, _dataset.getDatasetId()); - if (ul != null) - { - event.setLsid(ul.getFilePath()); - } AuditLogService.get().addEvent(user, event); } } diff --git a/study/src/org/labkey/study/model/StudyManager.java b/study/src/org/labkey/study/model/StudyManager.java index 207daa48924..3374836be98 100644 --- a/study/src/org/labkey/study/model/StudyManager.java +++ b/study/src/org/labkey/study/model/StudyManager.java @@ -2566,7 +2566,7 @@ public void deleteDataset(StudyImpl study, User user, DatasetDefinition ds, bool SchemaKey schemaPath = SchemaKey.fromParts(SCHEMA.getSchemaName()); QueryService.get().fireQueryDeleted(user, study.getContainer(), null, schemaPath, Collections.singleton(ds.getName())); - new DatasetDefinition.DatasetAuditHandler(ds).addAuditEvent(user, study.getContainer(), AuditBehaviorType.DETAILED, "Dataset deleted: " + ds.getName(), null); + new DatasetDefinition.DatasetAuditHandler(ds).addAuditEvent(user, study.getContainer(), AuditBehaviorType.DETAILED, "Dataset deleted: " + ds.getName()); transaction.addCommitTask(() -> unindexDataset(ds), @@ -2682,8 +2682,6 @@ public void deleteAllStudyData(Container c, User user) // Table.delete(SCHEMA.getTableInfoVisitMap(), containerFilter); assert deletedTables.add(SCHEMA.getTableInfoVisitMap()); - Table.delete(StudySchema.getInstance().getTableInfoUploadLog(), containerFilter); - assert deletedTables.add(StudySchema.getInstance().getTableInfoUploadLog()); Table.delete(_datasetHelper.getTableInfo(), containerFilter); _datasetHelper.clearCache(c); assert deletedTables.add(_datasetHelper.getTableInfo()); diff --git a/study/src/org/labkey/study/model/UploadLog.java b/study/src/org/labkey/study/model/UploadLog.java deleted file mode 100644 index ff7e40e56fb..00000000000 --- a/study/src/org/labkey/study/model/UploadLog.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2008-2019 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.labkey.study.model; - -import org.labkey.api.data.Container; - -import java.util.Date; - -/** - * User: Mark Igra - * Date: Aug 17, 2006 - * Time: 12:56:46 PM - */ -public class UploadLog -{ - private int rowId; - private Container container; - private String entityId; - private Date created; - private int userId; - private String description; - private String filePath; - private int datasetId; - private String status; - - public Container getContainer() - { - return container; - } - - public void setContainer(Container container) - { - this.container = container; - } - - public String getEntityId() - { - return entityId; - } - - public void setEntityId(String entityId) - { - this.entityId = entityId; - } - - public Date getCreated() - { - return created; - } - - public void setCreated(Date created) - { - this.created = created; - } - - public int getUserId() - { - return userId; - } - - public void setUserId(int userId) - { - this.userId = userId; - } - - public String getDescription() - { - return description; - } - - public void setDescription(String description) - { - this.description = description; - } - - public String getFilePath() - { - return filePath; - } - - public void setFilePath(String filePath) - { - this.filePath = filePath; - } - - public int getDatasetId() - { - return datasetId; - } - - public void setDatasetId(int datasetId) - { - this.datasetId = datasetId; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - public int getRowId() - { - return rowId; - } - - public void setRowId(int rowId) - { - this.rowId = rowId; - } -} diff --git a/study/src/org/labkey/study/view/datasetDetails.jsp b/study/src/org/labkey/study/view/datasetDetails.jsp index 37a3a33f647..b5e74c42da2 100644 --- a/study/src/org/labkey/study/view/datasetDetails.jsp +++ b/study/src/org/labkey/study/view/datasetDetails.jsp @@ -15,15 +15,15 @@ * limitations under the License. */ %> +<%@ page import="org.labkey.api.collections.IntHashMap"%> <%@ page import="org.labkey.api.data.Container"%> <%@ page import="org.labkey.api.data.TableInfo"%> <%@ page import="org.labkey.api.pipeline.PipelineService"%> -<%@ page import="org.labkey.api.security.SecurityManager"%> +<%@ page import="org.labkey.api.security.SecurityManager" %> <%@ page import="org.labkey.api.security.User" %> <%@ page import="org.labkey.api.security.permissions.AdminPermission" %> <%@ page import="org.labkey.api.security.permissions.DeletePermission" %> <%@ page import="org.labkey.api.security.permissions.Permission" %> -<%@ page import="org.labkey.api.security.permissions.UpdatePermission" %> <%@ page import="org.labkey.api.study.Dataset" %> <%@ page import="org.labkey.api.study.StudyService" %> <%@ page import="org.labkey.api.study.TimepointType" %> @@ -49,7 +49,6 @@ <%@ page import="java.util.List" %> <%@ page import="java.util.Set" %> <%@ page import="static org.labkey.study.model.DatasetDomainKindProperties.TIME_KEY_FIELD_DISPLAY" %> -<%@ page import="org.labkey.api.collections.IntHashMap" %> <%@ page extends="org.labkey.api.jsp.JspBase" %> <%@ taglib prefix="labkey" uri="http://www.labkey.org/taglib" %> <%! @@ -132,13 +131,6 @@ if (permissions.contains(AdminPermission.class)) } } -if (permissions.contains(UpdatePermission.class) && !isDatasetInherited) -{ - ActionURL showHistoryURL = new ActionURL(StudyController.ShowUploadHistoryAction.class, c); - showHistoryURL.addParameter("id", dataset.getDatasetId()); - buttons.add(button("Show Import History").href(showHistoryURL)); -} - if (permissions.contains(AdminPermission.class) && !isDatasetInherited) { if (dataset.getType().equals(Dataset.TYPE_STANDARD)) From 354ee9b706950e13cc7537f4e8674c1d7dc35a6d Mon Sep 17 00:00:00 2001 From: Lum Date: Tue, 2 Dec 2025 10:53:35 -0800 Subject: [PATCH 2/3] Bump module version --- study/src/org/labkey/study/StudyModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/study/src/org/labkey/study/StudyModule.java b/study/src/org/labkey/study/StudyModule.java index a32ffb679fc..21f07d27190 100644 --- a/study/src/org/labkey/study/StudyModule.java +++ b/study/src/org/labkey/study/StudyModule.java @@ -228,7 +228,7 @@ public String getName() @Override public Double getSchemaVersion() { - return 25.003; + return 25.004; } @Override From 0230521051c98da1d7a37ed3f4a4ba233f7c7b6a Mon Sep 17 00:00:00 2001 From: Lum Date: Tue, 2 Dec 2025 10:56:15 -0800 Subject: [PATCH 3/3] imports --- study/src/org/labkey/study/StudyModule.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/study/src/org/labkey/study/StudyModule.java b/study/src/org/labkey/study/StudyModule.java index 21f07d27190..69570d36931 100644 --- a/study/src/org/labkey/study/StudyModule.java +++ b/study/src/org/labkey/study/StudyModule.java @@ -42,8 +42,6 @@ import org.labkey.api.exp.PropertyType; import org.labkey.api.exp.api.ExperimentService; import org.labkey.api.exp.property.PropertyService; -import org.labkey.api.files.FileContentService; -import org.labkey.api.files.TableUpdaterFileListener; import org.labkey.api.message.digest.ReportAndDatasetChangeDigestProvider; import org.labkey.api.migration.DatabaseMigrationService; import org.labkey.api.migration.DefaultMigrationSchemaHandler;