openjournals / theoj

The Open Journal
http://theoj.org
MIT License
129 stars 10 forks source link

Editors can't accept papers #239

Closed freelanceastro closed 8 years ago

arfon commented 8 years ago

@marcrohloff - I think this is because the paper isn't under_review? anymore (see here). Perhaps we should allow for the paper state to be review_complete also?

marcrohloff commented 8 years ago

That piece of code controls when you can change the state of an issue (resolved, unresolved, disputed) not th paper

marcrohloff commented 8 years ago

@arfon I tested and this works the way I expect, i.e.

freelanceastro commented 8 years ago

@marcrohloff Did you change anything in the code since this morning? Arfon and I tried this earlier today, with exactly that workflow, and it didn't work. @arfon watched the Heroku logs and saw the error messages that came up when I tried to accept the paper -- can you paste those in here?

marcrohloff commented 8 years ago

I haven't changed anything. I ran the tests on my local machine. ​

marcrohloff commented 8 years ago

Actually there was an issue where attempting to mark a review while not 'under review' as incomplete would look like it was successful but not be. Fix should be in prod.

arfon commented 8 years ago

That piece of code controls when you can change the state of an issue (resolved, unresolved, disputed) not th paper

Right but it is called here in the Paper model to when trying to mark the paper as complete: https://github.com/openjournals/theoj/blob/master/app/models/paper.rb#L151

arfon commented 8 years ago

@marcrohloff I've written a failing test for this over here that demonstrates the issue: https://github.com/openjournals/theoj/pull/247

marcrohloff commented 8 years ago

Thanks for tracking that down. I think I've got it fixed now.

marcrohloff commented 8 years ago

Although I've fixed this, is the best option to resolve all the comments when a paper is accepted? Maybe it would be useful to see the last state of each comment.