diff --git a/study/src/org/labkey/study/controllers/publish/PublishController.java b/study/src/org/labkey/study/controllers/publish/PublishController.java index e64baf31f4c..3ec53f7a405 100644 --- a/study/src/org/labkey/study/controllers/publish/PublishController.java +++ b/study/src/org/labkey/study/controllers/publish/PublishController.java @@ -374,6 +374,10 @@ public void run() { error("Failure", t); } + + if (getErrors() == 0) + setStatus(TaskStatus.complete); + info("Auto link to study complete"); } } diff --git a/study/src/org/labkey/study/importer/CreateChildStudyPipelineJob.java b/study/src/org/labkey/study/importer/CreateChildStudyPipelineJob.java index 7210ba5db5a..2104a42ad65 100644 --- a/study/src/org/labkey/study/importer/CreateChildStudyPipelineJob.java +++ b/study/src/org/labkey/study/importer/CreateChildStudyPipelineJob.java @@ -275,6 +275,7 @@ public boolean run(ViewContext context) // Save the snapshot RowId to the destination study StudyImpl mutableStudy = StudyManager.getInstance().getStudy(getDstContainer()).createMutable(); mutableStudy.setStudySnapshot(snapshot.getRowId()); + StudyManager.getInstance().updateStudy(user, mutableStudy); // export objects from the parent study, then import them into the new study getLogger().info("Exporting data from parent study."); @@ -311,6 +312,7 @@ public boolean run(ViewContext context) new TopLevelStudyPropertiesImporter().process(studyImportContext, studyDir, errors); // after the data has been imported, configure the new study setting for undefined timepoints + mutableStudy = StudyManager.getInstance().getStudy(getDstContainer()).createMutable(); if (sourceStudy.isFailForUndefinedTimepoints()) mutableStudy.setFailForUndefinedTimepoints(true); diff --git a/study/src/org/labkey/study/visitmanager/RelativeDateVisitManager.java b/study/src/org/labkey/study/visitmanager/RelativeDateVisitManager.java index 7de09e8b1a3..a646125a867 100644 --- a/study/src/org/labkey/study/visitmanager/RelativeDateVisitManager.java +++ b/study/src/org/labkey/study/visitmanager/RelativeDateVisitManager.java @@ -327,7 +327,7 @@ private void _updateVisitRowId() return errors; } - public @Nullable ValidationException recomputeDates(Date oldStartDate, User user) + public @NotNull ValidationException recomputeDates(Date oldStartDate, User user) { if (null != oldStartDate) { @@ -351,7 +351,7 @@ private void _updateVisitRowId() return updateParticipantVisits(user, getStudy().getDatasets()); } } - return null; + return new ValidationException(); } // Return sql for fetching all datasets and their visit sequence numbers, given a container