pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
305 stars 444 forks source link

Author Reviewer Grid: the grid fails to be displayed. #9957

Open defstat opened 5 months ago

defstat commented 5 months ago

Describe the bug In the Author's workflow->review stage of a given submission, the Reviewer Grid fails to be displayed.

To Reproduce Steps to reproduce the behavior:

  1. Go to a submission with an Open Peer Review reviewer assigned to it
  2. Login as the Author of that submission
  3. Go to that submission
  4. See the error.

image

What application are you using? OJS main branch

Additional information The underling error is Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given and it is referring to the actions template variable of the AuthorReviewerGridCellProvider.

The problem seems to be related to this. Here, the stable branch defines the query like so

$query = $this->_getSelectQuery() .
            ' WHERE r.review_round_id = ? AND r.review_method = ? AND r.date_confirmed IS NOT NULL AND r.declined <> 1 ORDER BY review_id';

The way that is implemented in the main branch, it seems that it is missing the r.date_confirmed IS NOT NULL AND r.declined <> 1 part of the query.


PRs

@Vitaliy-1 I have crafted this suggested PR for that.

PKP-LIB: #9958

Vitaliy-1 commented 4 months ago

@defstat, while testing this I noticed another problem - unable to see any files under that grid. My steps:

  1. Go to the submission in the review stage
  2. Assign a reviewer with an open review mode
  3. Perform a review and attach a review file during 3rd step. Ensuring that it's safe in the database with a file stage SUBMISSION_FILE_REVIEW_ATTACHMENT
  4. Finish the review
  5. Log in as an author
  6. Seeing that the Reviewer's Attachments grid is empty

I can reproduce the bug described here by assigning a reviewer and declining this request. But I'm confused. I don't remember this part of the code at all. So, under that grid all files at the stage SUBMISSION_FILE_REVIEW_ATTACHMENT should be shown if the review is open, right? But author is able to read the review and see the file through that form, so it's duplication of the functionality?

jardakotesovec commented 1 month ago

@defstat Also run into that - and was not aware of this issue. So I created new one at that time https://github.com/pkp/pkp-lib/issues/10453

I will keep it opened as well as it offers alternative solution.

What I propose as fix that display correctly the review assignment also if its not submitted yet. As result author (for open review) basically sees exactly the same thing as editors, because from the code that seemed to be the original intention.

@Vitaliy-1 @Devika008 @asmecher Any opinion on this?

Context is that when the review is opened one - we provide similar reviewer listing to author as the editor can see. Just with option to Read the review and no other actions. Which means that the author see whole process of reviewers are being requested, and they responded etc.

Question is whether we want to reduce it and display maybe only the reviews that has been submitted (which is closer to @defstat PR) or keep the whole process transparent.

asmecher commented 2 days ago

@jardakotesovec, I'm hesitant to make a major change without some pretty wide user testing. We've run into complaints before from both authors and editors. Authors want more information (they want to know what's happening with their submission), but editors want authors to see less information (they are tired of authors bothering them over any perceived change in the display). So authors and editors want opposite things in this case, and the current balance (minus the bug) is a careful one.

jardakotesovec commented 2 days ago

@asmecher @Devika008 have made bit of research about this, which she will share here and we will align it with that.

My intention here was not to change the behaviour - was really trying to understand the original intention to align fix with it. But having some additional feedback from outside will help us to fix that correctly.

I think we will go likely with conservative approach to make sure that the authors can see the reviews when they are in, but not revealing much of the process itself.