From d6d0a27409eb727cd84ce93f803aa096e0d66701 Mon Sep 17 00:00:00 2001 From: Aday Bujeda Date: Thu, 30 May 2024 11:50:18 +0100 Subject: [PATCH 1/2] Added author annual survey date to PPR report --- .../PPRSubmissionsReviewsReport.inc.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pprReviewsReportPlugin/reports/PPRSubmissionsReviewsReport.inc.php b/pprReviewsReportPlugin/reports/PPRSubmissionsReviewsReport.inc.php index 840839a..d097c11 100644 --- a/pprReviewsReportPlugin/reports/PPRSubmissionsReviewsReport.inc.php +++ b/pprReviewsReportPlugin/reports/PPRSubmissionsReviewsReport.inc.php @@ -36,7 +36,8 @@ function createReport($file, $contextId) { } //PRINT HEADERS - $headers = ['OJS ID', 'Authors Name', 'Title of Document', 'Authors Email', 'Authors Category', 'Authors Institution', 'Authors Department', 'Research Document Type', 'Associate Editor', 'Review Status', 'Author - Paper Received']; + $headers = ['OJS ID', 'Authors Name', 'Title of Document', 'Authors Email', 'Authors Category', 'Authors Institution', 'Authors Department', 'Research Document Type']; + $headers = array_merge($headers, ['Associate Editor', 'Review Status', 'Author - Paper Received', 'Annual Survey']); $headers = array_merge($headers, ['Coauthors Name', 'Coauthors Institute', 'Coauthors Email', 'Coauthors Category', 'Coauthors Department']); $headers = array_merge($headers, ['Reviewer', 'Reviewer Email', 'Reviewer Institution', 'Reviewer - 1st Email', 'Reviewer - Sent for Review', 'Reviewer - Response Time', 'Reviewer - Due Date']); $headers = array_merge($headers, ['Reviewer - Paper Returned', 'Reviewer - Time (days)', 'Author - Date Returned', 'Author - Review Time (days)']); @@ -96,6 +97,7 @@ function createReport($file, $contextId) { $row[] = $editor ? $editor->getFullName() : self::PPR_MISSING_DATA; $row[] = $reportUtil->getStatusText($submissionSentToReview, $review ? $review->getStatus(): null); $row[] = $reportUtil->formatDate($submission->getDateSubmitted()); + $row[] = $reportUtil->formatDate($this->getAnnualSurveyNotificationDate($contextId, $submission->getId())); $contributors = $publication->getData('authors'); $coauthors = $coauthorsInstitution = $coauthorsEmail = $coauthorsCategory = $coauthorsDepartment = []; @@ -186,5 +188,20 @@ private function getUser($userId) { return $this->userCache[$userId]; } + private function getAnnualSurveyNotificationDate($contextId, $submissionId) { + //THESE IDs ARE TAKEN FROM pprOjsPlugin/tasks/PPRTaskNotificationRegistry.inc.php + // ANNUAL SURVEY IS SENT IN THE SUBMISSION CLOSED NOTIFICATION + $NOTIFICATION_TYPE_PPR_PLUGIN = 80880000; + $SUBMISSION_CLOSED_AUTHOR_NOTIFICATION = 80880900; + $notificationDao = DAORegistry::getDAO('NotificationDAO'); + $notificationsIterator = $notificationDao->getByAssoc($SUBMISSION_CLOSED_AUTHOR_NOTIFICATION, + $submissionId, + $submissionId, + $NOTIFICATION_TYPE_PPR_PLUGIN, + $contextId); + $notifications = $notificationsIterator->toArray(); + return empty($notifications) ? null : reset($notifications)->getDateCreated(); + } + } From 78dca0637ebfe983b08bca976c309462ba722b67 Mon Sep 17 00:00:00 2001 From: abujeda Date: Thu, 30 May 2024 10:58:12 +0000 Subject: [PATCH 2/2] Release created: pprOjsPlugin-1.0.0.95 --- VERSION | 2 +- pprOjsPlugin/version.xml | 4 ++-- pprReviewsReportPlugin/version.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index d819215..516b44a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0.94 +1.0.0.95 diff --git a/pprOjsPlugin/version.xml b/pprOjsPlugin/version.xml index d5a1c60..35ffd42 100644 --- a/pprOjsPlugin/version.xml +++ b/pprOjsPlugin/version.xml @@ -4,8 +4,8 @@ pprOjsPlugin plugins.generic - 1.0.0.94 - 2024-05-23 + 1.0.0.95 + 2024-05-30 1 PeerPreReviewProgramPlugin \ No newline at end of file diff --git a/pprReviewsReportPlugin/version.xml b/pprReviewsReportPlugin/version.xml index 20e21ac..7c00ca1 100644 --- a/pprReviewsReportPlugin/version.xml +++ b/pprReviewsReportPlugin/version.xml @@ -4,8 +4,8 @@ pprReviewsReportPlugin plugins.reports - 1.0.0.94 - 2024-05-23 + 1.0.0.95 + 2024-05-30 1 PPRReviewsReportPlugin