Skip to content

Commit

Permalink
#9535 Skipped submission files that have an invalid file stage at the…
Browse files Browse the repository at this point in the history
… Native XML plugin
  • Loading branch information
jonasraoni committed Nov 27, 2023
1 parent 0e93d24 commit 782e7b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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];

// Report if no revision has been added
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

0 comments on commit 782e7b1

Please sign in to comment.