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

pkp/pkp-lib#9535 Skipped submission files that have an invalid file s… #9537

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
3 changes: 3 additions & 0 deletions locale/en_US/manager.po
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,9 @@ msgstr "The submission file {$id} was skipped because it is attached to a record
msgid "plugins.importexport.native.error.submissionFileWithoutRevision"
msgstr "The submission file {$id} was skipped because it does not have a valid revision."

msgid "plugins.importexport.native.error.submissionFileInvalidFileStage"
msgstr "The submission file {$id} was skipped because it does not have a valid file stage."

msgid "plugins.importexport.native.error.submissionFileRevisionMissing"
msgstr "The revision {$revision} of the submission file {$id} was skipped because the file was not found at the path \"{$path}\"."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ function createSubmissionFileNode($doc, $submissionFile) {
$stageToName[7] = $stageToName[SUBMISSION_FILE_FINAL];
// Maps the retired/removed SUBMISSION_FILE_FAIR_COPY to SUBMISSION_FILE_COPYEDIT (see: https://github.com/pkp/pkp-lib/issues/7470)
$stageToName[8] = $stageToName[SUBMISSION_FILE_COPYEDIT];

// Quit if the submission file has an invalid file stage
if (!isset($stageToName[$submissionFile->getFileStage()])) {
$deployment->addWarning(ASSOC_TYPE_SUBMISSION_FILE, $submissionFile->getId(), __('plugins.importexport.native.error.submissionFileInvalidFileStage', ['id' => $submissionFile->getId()]));
return null;
}

$genreDao = DAORegistry::getDAO('GenreDAO'); /* @var $genreDao GenreDAO */
$genre = $genreDao->getById($submissionFile->getData('genreId'));
$userDao = DAORegistry::getDAO('UserDAO'); /* @var $userDao UserDAO */
Expand Down