pkp/pkp-lib#11332 Add support for DOIs for peer reviews and author responses#5297
pkp/pkp-lib#11332 Add support for DOIs for peer reviews and author responses#5297
Conversation
|
|
||
| $q = DB::table($this->table, 'd') | ||
| ->leftJoin('publications as p', 'd.doi_id', '=', 'p.doi_id') | ||
| ->leftJoin('submissions as s', 'p.publication_id', '=', 's.current_publication_id') |
There was a problem hiding this comment.
here maybe as well, as below: I think this could work for Crossref, when all submission's objects have the same status, and given that the submission's current publication is the latest published... but it is mAYBE better to consider all, e.g. for DataCite where we save the status per sub-object (I think)...
There was a problem hiding this comment.
By this do you mean it's better to consider all publications, not just the current publication? That's what I was wondering as well (and just asked you about below).
classes/doi/DAO.php
Outdated
| ->leftJoin('review_rounds as rr', 'rrar.review_round_id', '=', 'rr.review_round_id') | ||
| ->leftJoin('publications as p', 'rr.publication_id', '=', 'p.publication_id') | ||
| ->whereNotNull('rrar.doi_id') | ||
| ->where('p.status', '=', PKPPublication::STATUS_PUBLISHED); |
There was a problem hiding this comment.
Are author responses always publicly visible?
There was a problem hiding this comment.
They currently are, but this should probably not be the case. I think handling that might be a separate issue, though. Are you okay to keep this as is if I create another issue that addresses author response visibility?
There was a problem hiding this comment.
Updated this in a few different places so it only gets public ones. Can change the logic later if we find we need to.
classes/doi/DAO.php
Outdated
| $q->whereIn('d.doi_id', function (Builder $q) { | ||
| $q->select('p.doi_id') | ||
| ->from('publications', 'p') | ||
| // PR_TODO: It doesn't look like this takes DOI versioning into consideration. |
There was a problem hiding this comment.
@bozana, I also meant to ask you thought about this and if this is a problem based on your work on DOI versioning. I'm not sure if I'm missing something here, but to me it looks like this and the PR_TODO line below both only consider the current publication? Is this intentional or do we need to consider how to update this to account for all publications? What do you think?
There was a problem hiding this comment.
I think this works right now, when we consider how we deposit to Crossref -- I believe that is why I have not changed it: There need to be a current publication that is published (and it is always the last published publication). This is correct. Also, because we submit all publications of a submission to Crossref in one XML, all publications have the same deposit status. So the check of the status only for the current publication here works too, I believe.
However, I need to see how is it for DataCite -- if we submit every Publication separately and have separate statuses, then this will probably not be correct. Thus, we could leave it so for now, and see then later, when working on DataCite. Or, we could immediately consider a different solution, that would also work for both cases (Crossref and DataCite).
311a12a to
7e4e679
Compare
No description provided.