Skip to content
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

API for retrieving files uploaded by reviewer #9963

Open
jardakotesovec opened this issue May 16, 2024 · 4 comments
Open

API for retrieving files uploaded by reviewer #9963

jardakotesovec opened this issue May 16, 2024 · 4 comments
Assignees
Labels
Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days.
Milestone

Comments

@jardakotesovec
Copy link
Contributor

jardakotesovec commented May 16, 2024

Describe the issue
While working on new submission listing. Having reviewer role I need to be able present files that has been uploaded by me (reviewer).

File that is uploaded by reviewer for given review are saved in submission_files table with SUBMISSION_FILE_REVIEW_ATTACHMENT = 5 fileStage. And are associated with given reviewAssignmentId (ASSOC_TYPE_REVIEW_ASSIGNMENT).

/submissions/{submissionId}/files currently supports filtering by fileStages and reviewRoundIds.

Proposed solution
Given that this file is associated via reviewAssignmentId, it would be probably easiest to retrieve it by adding reviewAssignmentId query param?

But no strong opinion particular solution as long as being reviewer I can retrieve these files.

What application are you using?
OJS, OMP or OPS version 3.5

Additional information
Screenshot 2024-05-16 at 11 40 53

@jardakotesovec jardakotesovec added the Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days. label May 16, 2024
@jardakotesovec jardakotesovec added this to the 3.5.0 LTS milestone May 16, 2024
@Vitaliy-1
Copy link
Collaborator

I don't see that we expose review files for reviewers through API. Looking at the code for the submissions/{submissionId}/files endpoint, PKPSubmissionFileController::getMany(), It might require creation of a new endpoint - to not mixing the logic there. Maybe a new Policy, not sure if UserAccessibleWorkflowStageRequiredPolicy will work here. Looking into it...

@Vitaliy-1 Vitaliy-1 self-assigned this Jun 14, 2024
@ewhanson
Copy link
Collaborator

I generally also like the idea of a new, review-centric endpoint. I imagine we will need more of those in the future and it would be good to start to build those out now rather than fit htem all into the existing submissions/{submissionId}/files endpoint.

@Vitaliy-1
Copy link
Collaborator

PR pkp-lib: #10112
tests: pkp/ojs#4335

@Vitaliy-1
Copy link
Collaborator

@ewhanson, can you take a look at this PR?
I've created a new endpoint and policy. Was looking at existing once, ReviewAssignmentAccessPolicy was pretty close but it derives data about reviewAssignment from the submission and this doesn't work here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days.
Projects
None yet
Development

No branches or pull requests

4 participants