janeway
janeway copied to clipboard
Author metadata shared with crossref on acceptance before freezing author records
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 beforearticle.accept_article
- [ ] Add a testcase covering the
review.review_decision
view.
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.
Ah, thanks for explaining that :+1: