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

Review Information is overwritten with new review #8

Open
felixhelix opened this issue Oct 19, 2023 · 2 comments
Open

Review Information is overwritten with new review #8

felixhelix opened this issue Oct 19, 2023 · 2 comments

Comments

@felixhelix
Copy link

felixhelix commented Oct 19, 2023

Dear @ajnyga,

there are some issues I came across, and maybe they are interrelated. The first is that it was not possible for me to select an object for review that was in the list of objects created by the manager: The list was empty. Maybe this is related to the fact that the objects for review can be reserved for certain users. Alas, there is no way to designate such a user, and so the field value is NULL:

grafik

I thus changed the query in ObjectsForReviewForm.inc.php in the fetch method from
$objectsForReview = $objectForReviewDao->getByUserId($currentUser->getId(), NULL, true)
with
$objectsForReview = $objectForReviewDao->getAll($context->getId(), false, false)
And also commented out a section in the ObjectsForReviewGridHandler method addReservedObjectForReview where the plugin checked the userId.
Then it worked fine, and the user could select an object for review. However, if another user writes a review of the same object, the value submission_id in the table objects_for_review is overwritten with the id of the new review, and the reference to the first review is thus lost.
I don't know, if this is maybe by design?

Yours,

Felix

@ajnyga
Copy link
Owner

ajnyga commented Oct 20, 2023

thanks, I will check this soon. It has been a while since I last visited the plugin so not sure if this is something I have already fixed locally.

@ajnyga
Copy link
Owner

ajnyga commented Dec 19, 2024

Hi,

Sorry for taking such a long time, working on some of my plugins has been on hold.

The first is that it was not possible for me to select an object for review that was in the list of objects created by the manager: The list was empty. Maybe this is related to the fact that the objects for review can be reserved for certain users. Alas, there is no way to designate such a user, and so the field value is NULL:

I could not reproduce this. My steps:

  • as the manager, add a new object for review
  • login as an author
  • go to the public listing and see the added object
  • reserve the object
  • add a new submission as an author
  • select the reserved object for the review

if another user writes a review of the same object, the value submission_id in the table objects_for_review is overwritten with the id of the new review, and the reference to the first review is thus lost.

Are you talking about a scenario where the manager has added the object? In that case when it is reserved, no other author should be able to send a review for it to the system. Of course someone could create a duplicate.

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

No branches or pull requests

2 participants