Skip to content

Commit

Permalink
Prevents tasks not being indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Jan 25, 2024
1 parent fd18023 commit 148b251
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.kitodo.api.validation.ValidationResult;
import org.kitodo.data.database.beans.Process;
import org.kitodo.data.database.beans.Project;
import org.kitodo.data.database.beans.Task;
import org.kitodo.data.database.beans.Template;
import org.kitodo.data.database.exceptions.DAOException;
import org.kitodo.data.exceptions.DataException;
Expand All @@ -62,6 +63,7 @@
import org.kitodo.production.process.ProcessGenerator;
import org.kitodo.production.services.ServiceManager;
import org.kitodo.production.services.data.ProcessService;
import org.kitodo.production.services.data.TaskService;
import org.kitodo.production.services.dataformat.MetsService;
import org.kitodo.production.services.file.FileService;
import org.kitodo.production.services.validation.MetadataValidationService;
Expand All @@ -86,6 +88,7 @@ final class ImportingProcess {
private final MetadataValidationService metadataValidationService = ServiceManager.getMetadataValidationService();
private final MetsService metsService = ServiceManager.getMetsService();
private final ProcessService processService = ServiceManager.getProcessService();
private final TaskService taskService = ServiceManager.getTaskService();

/*
* This class makes extensive use of global variables (fields). This is due
Expand Down Expand Up @@ -474,6 +477,9 @@ private Integer createDatabaseProcess() throws ProcessGenerationException, DataE
process.setTitle(title);
process.setBaseType(baseType);
processService.save(process);
for (Task task : process.getTasks()) {
taskService.save(task);
}
return process.getId();
}

Expand Down

0 comments on commit 148b251

Please sign in to comment.