Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix newspaper issue being displayed as 'unknown' in year process #6425

Merged
merged 1 commit into from
Feb 19, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import org.kitodo.data.database.beans.Process;
import org.kitodo.data.database.exceptions.DAOException;
import org.kitodo.data.elasticsearch.exceptions.CustomResponseException;
import org.kitodo.data.exceptions.DataException;
import org.kitodo.exceptions.CommandException;
import org.kitodo.exceptions.DoctypeMissingException;
Expand Down Expand Up @@ -86,7 +87,7 @@ public void run() {
}
super.setProgress(100);
} catch (ConfigurationException | DAOException | DataException | DoctypeMissingException | IOException
| ProcessGenerationException | CommandException e) {
| ProcessGenerationException | CommandException | CustomResponseException e) {
setException(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.kitodo.config.ConfigProject;
import org.kitodo.data.database.beans.Process;
import org.kitodo.data.database.exceptions.DAOException;
import org.kitodo.data.elasticsearch.exceptions.CustomResponseException;
import org.kitodo.data.exceptions.DataException;
import org.kitodo.exceptions.CommandException;
import org.kitodo.exceptions.DoctypeMissingException;
Expand Down Expand Up @@ -288,7 +289,7 @@ public int getNumberOfSteps() {
* but its value cannot be evaluated to an integer
*/
public boolean nextStep() throws ConfigurationException, DAOException, DataException, IOException,
ProcessGenerationException, DoctypeMissingException, CommandException {
ProcessGenerationException, DoctypeMissingException, CommandException, CustomResponseException {

if (currentStep == 0) {
initialize();
Expand Down Expand Up @@ -502,7 +503,7 @@ private static Map<String, String> getMetadataEntries(Collection<Metadata> metad
}

private void createProcess(int index) throws DAOException, DataException, IOException, ProcessGenerationException,
CommandException {
CommandException, CustomResponseException {
final long begin = System.nanoTime();

List<IndividualIssue> individualIssuesForProcess = processesToCreate.get(index);
Expand All @@ -523,6 +524,7 @@ private void createProcess(int index) throws DAOException, DataException, IOExce
yearProcess.getChildren().add(getGeneratedProcess());
processService.save(getGeneratedProcess(), true);
createMetadataFileForProcess(individualIssuesForProcess, title);
processService.saveToIndex(getGeneratedProcess(), false);

if (logger.isTraceEnabled()) {
logger.trace("Creating newspaper process {} took {} ms", title,
Expand Down Expand Up @@ -578,6 +580,7 @@ private void createMetadataFileForProcess(List<IndividualIssue> individualIssues
processDay.getChildren().add(processIssue);

LogicalDivision yearIssue = new LogicalDivision();
yearIssue.setType(issueDivisionView.getId());
LinkedMetsResource linkToProcess = new LinkedMetsResource();
linkToProcess.setLoctype("Kitodo.Production");
linkToProcess.setUri(processService.getProcessURI(getGeneratedProcess()));
Expand Down
Loading