Skip to content

pkp/pkp-lib#11318 Bug fix, Don't mix revisions for different file types #11341

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

Merged
merged 1 commit into from
May 5, 2025

Conversation

jardakotesovec
Copy link
Contributor

No description provided.

@@ -217,6 +217,7 @@ public function getSubmissionFiles()
->getCollector()
->filterByReviewRoundIds([(int) $reviewRound->getId()])
->filterBySubmissionIds([$submissionId])
->filterByFileStages([(int) $this->getData('fileStage')])
->getMany()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This make sure that we list only from the same "file grid" for the "If you are uploading a revision of an existing file, please indicate which file."

@@ -262,7 +263,7 @@ public function getRevisionSubmissionFilesSelection($user, $uploadedFile = null)
}
if (
($submissionFile->getFileStage() == SubmissionFile::SUBMISSION_FILE_REVIEW_ATTACHMENT || $submissionFile->getFileStage() == SubmissionFile::SUBMISSION_FILE_REVIEW_FILE) &&
$stageAssignmentDao->getBySubmissionAndRoleIds($submissionFile->getData('submissionId'), [Role::ROLE_ID_AUTHOR], $this->getStageId(), $user->getId())
$stageAssignmentDao->getBySubmissionAndRoleIds($submissionFile->getData('submissionId'), [Role::ROLE_ID_AUTHOR], $this->getStageId(), $user->getId())->next()
) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fix, to make this condition working as intended. But not sure if thats necessary anymore. As the logic seemed that getSubmissionFiles would return ALL files for given review round. And than the exclusions made sense to not expose some of these files to the Author. But if getSubmissionFiles is now returning just the same fileType, I don't think thats necessary. But keeping the changes minimum due to my limited understanding of this area :-).

Copy link
Contributor

@bozana bozana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks all good to me

@jardakotesovec jardakotesovec merged commit 278df7a into pkp:stable-3_4_0 May 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants