We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 3669

Summary: Import Peer Reviews doesn't work with custom review form
Product: OJS Reporter: James MacGregor <jmacgreg>
Component: ReviewersAssignee: PKP Support <pkp-support>
Status: RESOLVED FIXED    
Severity: normal CC: ivan.sibilla
Priority: P1    
Version: 2.x   
Hardware: PC   
OS: Mac OS X 10.0   
Version Reported In: Also Affects:
Attachments: Patch against OJS Pre-2.3 CVS
Patch against OJS Pre-2.2.3 CVS
Patch against OCS Pre-2.1.2/Pre-2.3 CVS
Patch against OJS Pre-2.3 CVS
Patch against OJS Pre-2.2.3 CVS
Patch against OCS Pre-2.1.2/Pre-2.3 CVS
Additional patch against OCS Pre-2.3 CVS
Patch against OCS Pre-2.1.2 CVS
Additional patch against OJS Pre-2.3 CVS
Patch against OJS Pre-2.2.3 CVS

Description James MacGregor 2008-07-11 14:45:38 PDT
If I use the custom review form option (complete the review with dummy text, etc.), the Import Peer Reviews button sending the Editor Decision email returns an almost empty result: 

------------------------------------------------------
Reviewer A:
------------------------------------------------------

Nothing else. 

The review form available to the Editor appears correctly. It's just the email import that is empty.
Comment 1 Alec Smecher 2008-07-11 16:29:35 PDT
I believe this is by design -- I recall John suggesting that "Import Peer Reviews" when review forms are used should result in a blank spot in the email (i.e. the form should not be somehow imported). John?
Comment 2 John Willinsky 2008-07-11 21:44:40 PDT
The concern is that importing review forms into an email will lose their format and potentially make them incomprehensible. If a form is used, it may be better to have a Attach Review Form to Email, ideally as a PDF. Is this beyond the pale?
Comment 3 James MacGregor 2008-07-12 10:37:31 PDT
(In reply to comment #2)
> The concern is that importing review forms into an email will lose their format
> and potentially make them incomprehensible. If a form is used, it may be better
> to have a Attach Review Form to Email, ideally as a PDF. Is this beyond the
> pale?
> 

What about doing it the default way, ie. importing the form data/values as flat text into the email body? The only issue I can see with that would be representing radio buttons and checkboxes, but there must be a reasonable way to do this -- you could print the question (item descriptor) and the chosen value, perhaps. Editors could still edit the review data in this way -- impossible to do if a PDF is attached. (I'm assuming Editors should have control over the review form data that's passed to the Author, but maybe I'm wrong?)
Comment 4 John Willinsky 2008-07-12 11:02:30 PDT
Editors should have control over what authors see -- to protect them from the merely hurtful -- and if there's a way to turn all forms into email-able text, and it sounds like there are good ideas about this, then that would be good.
Comment 5 Alec Smecher 2008-07-13 13:11:29 PDT
Agreed, but too late for OJS 2.2.1. Deferring until next release.
Comment 6 Matthew Crider 2008-10-23 14:01:20 PDT
Created attachment 1048 [details]
Patch against OJS Pre-2.3 CVS
Comment 7 Matthew Crider 2008-10-23 15:10:42 PDT
Created attachment 1049 [details]
Patch against OJS Pre-2.2.3 CVS
Comment 8 Matthew Crider 2008-10-23 15:12:20 PDT
OCS2-devel is really unstable right now--I'm going to hold off backporting until its worked out a bit (e.g. clicking on the 'review forms' link and several links under the general management page lead to errors).
Comment 9 Matthew Crider 2008-10-29 13:18:20 PDT
Created attachment 1059 [details]
Patch against OCS Pre-2.1.2/Pre-2.3 CVS

Also fixes an error in templates/reviewer/submission.tpl where the 'enter review comments' step was shown as well as the 'fill in review form' step (it should be one or the other).
Comment 10 Alec Smecher 2008-11-05 11:27:42 PST
Matt, looks good, but the test to see whether a review form is being used should be checking against $reviewAssignment->getReviewFormId(), e.g.:

if ($reviewAssignment->getReviewFormId()) {
        // It's a form-based review; include form contents
} else {
        // It's not a form-based review; use the comments
}

Actually, to go one step further, I'd suggest making the code include *both* text- and form-based review contents, as the Editor may choose a review form after a reviewer has already completed, and that review information shouldn't be excluded.
Comment 11 Matthew Crider 2008-11-05 12:48:25 PST
Created attachment 1084 [details]
Patch against OJS Pre-2.3 CVS
Comment 12 Matthew Crider 2008-11-05 12:49:01 PST
Created attachment 1085 [details]
Patch against OJS Pre-2.2.3 CVS
Comment 13 Matthew Crider 2008-11-05 12:49:40 PST
Created attachment 1086 [details]
Patch against OCS Pre-2.1.2/Pre-2.3 CVS
Comment 14 Alec Smecher 2008-11-05 15:00:58 PST
Thanks, Matt, looks great -- please commit this to the devel trees of OJS and OCS; let's hold off committing it to -stable for the moment.
Comment 15 Matthew Crider 2008-11-05 15:19:26 PST
Committed to ocs2-devel and ojs2-devel.
Comment 16 Matthew Crider 2008-11-10 17:17:33 PST
Created attachment 1103 [details]
Additional patch against OCS Pre-2.3 CVS
Comment 17 Matthew Crider 2008-11-10 17:18:50 PST
Created attachment 1104 [details]
Patch against OCS Pre-2.1.2 CVS

Use in place of attachment 1086 [details] to patch ocs2-stable
Comment 18 Matthew Crider 2008-11-10 17:19:14 PST
Created attachment 1105 [details]
Additional patch against OJS Pre-2.3 CVS
Comment 19 Matthew Crider 2008-11-10 17:21:05 PST
Created attachment 1106 [details]
Patch against OJS Pre-2.2.3 CVS

Use in place of attachment 1085 [details].  These patches address a bug discovered by Scott Harrison, in which importing review responses into an email when there are no actual responses throws an error.
Comment 20 Matthew Crider 2008-11-10 17:26:01 PST
Committed attachments 1103 and 1105.
Comment 21 Alec Smecher 2008-11-14 12:33:36 PST
Thanks, Matt, looks good. Please commit the rest and close the bug.
Comment 22 Matthew Crider 2008-11-14 16:39:01 PST
Committed attachments 1104 and 1106 to OCS/OJS stable.  Closing.
Comment 23 Ramon Fonseca 2008-11-21 08:45:21 PST
Hello all,

I tried to read and understand this thread, but ended up confused.
Has the import reviewer comments been implemented when using custom forms?

Is the "Patch against OJS Pre-2.2.3.CVS" the fix?
Comment 24 Matthew Crider 2008-11-21 08:57:44 PST
(In reply to comment #23)
> Hello all,
> 
> I tried to read and understand this thread, but ended up confused.
> Has the import reviewer comments been implemented when using custom forms?
> 
> Is the "Patch against OJS Pre-2.2.3.CVS" the fix?
> 

Yeah, I was just as confused when committing to CVS :)  Just use attachment 1106 [details] (the last one), Ramón.
Comment 25 Sibi 2011-01-13 02:27:21 PST
(In reply to comment #24)
> (In reply to comment #23)
> > Hello all,
> > 
> > I tried to read and understand this thread, but ended up confused.
> > Has the import reviewer comments been implemented when using custom forms?
> > 
> > Is the "Patch against OJS Pre-2.2.3.CVS" the fix?
> > 
> 
> Yeah, I was just as confused when committing to CVS :)  Just use attachment
> 1106 [details] (the last one), Ramón.

Hello,

I've set the code (patch) and now if you enclose the comments of the templates, but html tag is read as plain text.

I need help to solve this problem. How can read the html tags and apply them in the text?

Thanks.

Example:

Revista de Psicología del Deporte
------------------------------------------------------
Revisor/a A:

<strong>En su opinión el trabajo:</strong>: 
	No se recomienda su publicación

<p><strong>Comentarios al Director y Editores</strong></p>: 
	El trabajo plantea un analísis excelente entre observadores de una herramienta de observación de la acción técnica del bloqueo, pero a mi entender no se presenta adecuadamente ni la herramienta ni su utilidad en el entrenamiento y competición. De los datos presentados ninguno hace referencia al objetivo real del estudio: "el bloqueo en voleibol".