janeway icon indicating copy to clipboard operation
janeway copied to clipboard

Author metadata shared with crossref on acceptance before freezing author records

Open joemull opened this issue 3 years ago • 2 comments

The Crossref article deposit template is written to include a number of author fields. However, article.accept_article() and identifier.register() are called before article.snapshot_authors(), so, AFAIK, there aren't any FrozenAuthor objects to populate the Crossref metadata when DOIs are registered on acceptance, even though the template context looks for them.

We should adjust the order of function calls here to make sure authors are being populated, and test the XML that goes out.

https://github.com/BirkbeckCTP/janeway/blob/fc238996773ff401604e1cd679f29544bb7655bf/src/review/views.py#L1458

Might be related to https://github.com/BirkbeckCTP/janeway/issues/2043

  • [ ] Ensure article.snapshot_authors is called before article.accept_article
  • [ ] Add a testcase covering the review.review_decision view.

joemull avatar Jan 13 '22 19:01 joemull

Thanks @joemull,

Author details are always snapshotted at submission, so the author metadata is sent to crossref matching the author details received during the submission process.

https://github.com/BirkbeckCTP/janeway/blob/fc238996773ff401604e1cd679f29544bb7655bf/src/submission/views.py#L518

That said, you're right, the order of the calls in the review stage is still wrong. We should still all article.snapshot_authors before article.accept on that particular view. Or even better, snapshot_authors as part of the article acceptance call, moving that logic from the view to the article model.

mauromsl avatar Jan 14 '22 08:01 mauromsl

Ah, thanks for explaining that :+1:

joemull avatar Jan 14 '22 14:01 joemull