Bug 7026 - CrossRef plugin uses incorrect publication date for articles
: CrossRef plugin uses incorrect publication date for articles
Status: REOPENED
Product: OJS
Classification: Unclassified
Component: Submissions and Publishing
: 2.4.x
: All All
: P3 normal
Assigned To: James MacGregor
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-16 17:58 PST by James MacGregor
Modified: 2013-02-15 18:34 PST (History)
4 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against OJS pre-2.3.7 (855 bytes, patch)
2012-01-16 18:00 PST, James MacGregor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2012-01-16 17:58:30 PST
The CrossRef plugin appears to use issue->getDatePublished() rather than $article->getDatePublished() for the journal_article... year/month/day nodes.
Comment 1 James MacGregor 2012-01-16 18:00:21 PST
Created attachment 3695 [details]
Patch against OJS pre-2.3.7

I believe the following simple patch fixes the problem, but since this change affects metadata representation I'd prefer if someone (Alec?) could vet and confirm before I commit.
Comment 2 Alec Smecher 2012-01-17 05:00:08 PST
James, that looks fine to me as long as it's been smoke-tested for typos. Go for it.
Comment 3 James MacGregor 2012-01-17 09:35:02 PST
CrossRef uses incorrect publication date for articles
https://github.com/pkp/ojs/commit/e5f419bcbf1f53b1ca4e8ea7ff9605545cf2162e
Comment 4 James MacGregor 2012-01-17 09:35:02 PST
CrossRef plugin uses incorrect publication date for articles
https://github.com/pkp/ojs/commit/a1f15f136acf94125e130871b74339555d7eff6c
Comment 5 James MacGregor 2012-01-17 09:56:55 PST
Thanks, Alec! I tested against a devel and production server, and all looks good.
Comment 6 kreissaege 2012-04-02 02:17:02 PDT
(In reply to comment #5)
> Thanks, Alec! I tested against a devel and production server, and all looks
> good.

Hello,

I'm afraid, that this patch is not correct. For crossref-data the article publication-date is mandatory but with this fix only a article-publication-date is inserted into Crossref-Export File, if this value is set.
There need`s a else condition with
$publicationDateNode =& CrossRefExportDom::generatePublisherDateDom($doc, $issue->getDatePublished());

Best regards
Katrin
Comment 7 Alec Smecher 2012-04-02 08:54:30 PDT
Katrin, are you encountering situations where an article is published (i.e. is available on the public website) but this date is not set?
Comment 8 James MacGregor 2012-04-19 22:07:12 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > Thanks, Alec! I tested against a devel and production server, and all looks
> > good.
> 
> Hello,
> 
> I'm afraid, that this patch is not correct. For crossref-data the article
> publication-date is mandatory but with this fix only a article-publication-date
> is inserted into Crossref-Export File, if this value is set.
> There need`s a else condition with
> $publicationDateNode =& CrossRefExportDom::generatePublisherDateDom($doc,
> $issue->getDatePublished());
> 
> Best regards
> Katrin

Reopening to investigate further -- we've had another report of this being an issue at http://pkp.sfu.ca/support/forum/viewtopic.php?f=2&t=8492&p=33112#p33112.
Comment 9 Alec Smecher 2012-08-31 18:09:59 PDT
Deferring.