JATSParserPlugin icon indicating copy to clipboard operation
JATSParserPlugin copied to clipboard

Simplify the process of copying submission files and their metadata

Open Vitaliy-1 opened this issue 3 years ago • 0 comments

  1. Don't create a new file for a copied submission file (e.g., when importing a galley), use a file id of a submission file that is being copied.
  2. Clone a submission file and its metadata. Review what metadata should be changed. Relevant for importing XML galleys and creating PDF galley. Example:
$newSubmissionFile = clone $submissionFile;
$newSubmissionFile->setData('fileStage', $fileStage);
$newSubmissionFile->setData('sourceSubmissionFileId', $submissionFile->getId());
$newSubmissionFile = Services::get('submissionFile')->add($newSubmissionFile, Application::get()->getRequest());

Vitaliy-1 avatar Mar 16 '21 15:03 Vitaliy-1