Bug 6794 - Authors can't download submissions resubmitted for review
Authors can't download submissions resubmitted for review
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: Reviewers
2.3.7
All All
: P3 normal
Assigned To: Matthew Crider
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-28 09:26 PDT by James MacGregor
Modified: 2011-11-29 15:34 PST (History)
4 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against OJS pre-2.3.7 (2.27 KB, patch)
2011-11-29 15:32 PST, Matthew Crider
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2011-07-28 09:26:12 PDT
If an editor resubmits a submission for review, and chooses the last author version file to resubmit, that file is listed as a download option ("Author Version") on the author submission's Review page under Peer Review Round x; but if the author clicks the link, they are redirected to the submission's Summary page. 

Editor Version link that works: 

http://git/ojs/index.php/test/author/downloadFile/18/59/1

Author Version link that redirects: 

http://git/ojs/index.php/test/author/downloadFile/18/60/1
Comment 1 Matthew Crider 2011-11-09 17:53:00 PST
The root cause of the problem here seems to be in SubmissionEditHandler, line 1030 (https://github.com/pkp/ojs/blob/master/pages/sectionEditor/SubmissionEditHandler.inc.php#L1030).  That code was there since the first signoff integration pass, but it looks to me like its completely unnecessary.  Unless anyone objects, I'll remove that tomorrow.
Comment 2 Alec Smecher 2011-11-10 09:28:10 PST
Matt, I'm not following; how does the presence of a signoff affect the author's ability to download a review file?
Comment 3 Matthew Crider 2011-11-10 10:41:23 PST
Alec, the existence of that signoff (actually the existence of the file ID in the signoff) causes the if block in line 550 of AuthorAction::downloadAuthorFile() to be true, and the if statement we want to be checking (and being true) for this case is on line 564 -- but that never gets checked.
Comment 4 Alec Smecher 2011-11-10 11:01:46 PST
OK; it's not clear to me why that signoff is being built, but it's being done wrong (it should copy to a new file) and in the wrong place (it looks like it might've been intended to move a file along automatically into copyediting, but this is a resubmit decision). Remove it.
Comment 5 Alec Smecher 2011-11-10 11:10:30 PST
The bad news: you're also going to have to see if you can figure out a way to correct existing data so the downloads don't continue to fail.
Comment 6 Matthew Crider 2011-11-10 11:16:08 PST
We could just move that if statement up above the one that checks the copyediting signoff?  That way it will get checked first and return true.
Comment 7 Alec Smecher 2011-11-10 11:20:30 PST
Technically those signoffs shouldn't be there; it should be easy enough to look for files that are active in both review and editing signoffs and remove the signoffs in those cases. But make sure you run this past a couple of real-world data sets before you do it!
Comment 8 Matthew Crider 2011-11-29 14:50:03 PST
Fixed download issue with authors revised files
https://github.com/pkp/ojs/commit/6c7f8ada8296925f6bb53a7f36e904518d9663bf
Comment 9 Matthew Crider 2011-11-29 15:31:06 PST
Hmm, didn't seem to get auto-added for the master branch:
https://github.com/pkp/ojs/commit/c08e5107567b5224ba6841db3a941bc78fcb2921
Comment 10 Matthew Crider 2011-11-29 15:32:08 PST
Created attachment 3685 [details]
Patch against OJS pre-2.3.7
Comment 11 Matthew Crider 2011-11-29 15:34:19 PST
Added to recommended patches list.  Closing.