From 5a7998a6a6899238a33b3c42da6283c98b725ca1 Mon Sep 17 00:00:00 2001 From: Taslan Graham Date: Tue, 31 Dec 2024 13:20:00 -0500 Subject: [PATCH] pkp/pkp-lib#10744 Increase opportunity for ORCID work/review deposits --- classes/orcid/actions/SendSubmissionToOrcid.php | 8 ++++++++ classes/search/PreprintSearchIndex.php | 3 +++ 2 files changed, 11 insertions(+) diff --git a/classes/orcid/actions/SendSubmissionToOrcid.php b/classes/orcid/actions/SendSubmissionToOrcid.php index ce658eca58..70d6ed0adb 100644 --- a/classes/orcid/actions/SendSubmissionToOrcid.php +++ b/classes/orcid/actions/SendSubmissionToOrcid.php @@ -35,4 +35,12 @@ protected function canDepositSubmission(): bool { return true; } + + /** + * @inheritDoc + * Override with empty implementation since OPS does not have reviews + */ + public function depositReviewsForSubmission(): void + { + } } diff --git a/classes/search/PreprintSearchIndex.php b/classes/search/PreprintSearchIndex.php index 9e25df4114..03b62f105d 100644 --- a/classes/search/PreprintSearchIndex.php +++ b/classes/search/PreprintSearchIndex.php @@ -18,6 +18,7 @@ use APP\core\Application; use APP\facades\Repo; +use APP\orcid\actions\SendSubmissionToOrcid; use APP\server\Server; use APP\server\ServerDAO; use APP\submission\Submission; @@ -75,6 +76,8 @@ public function submissionMetadataChanged($submission) $this->_updateTextIndex($submissionId, SubmissionSearch::SUBMISSION_SEARCH_TYPE, (array) $publication->getData('type')); $this->_updateTextIndex($submissionId, SubmissionSearch::SUBMISSION_SEARCH_COVERAGE, (array) $publication->getData('coverage')); // FIXME Index sponsors too? + + (new SendSubmissionToOrcid($publication, Application::getContextDAO()->getById($submission->getData('contextId'))))->execute(); } /**