pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
306 stars 445 forks source link

Move ORCID functionality into core application #9771

Closed ewhanson closed 4 months ago

ewhanson commented 8 months ago

The ORCID functionality currently exists as part of the OrcidProfilePlugin. This issue is to track the work needed to move ORCID functionality entirely within the core application.

This includes:

ewhanson commented 7 months ago

Hey @bozana, here is the initial pass at this work. Could you have a look and let me know what you think before I clean it up/proceed with implementing this for OMP and OPS? Thanks!

PRs:

bozana commented 7 months ago

Hi @ewhanson, I went through the code. All looks good. I haven't tested it. There are mostly smaller comments to consider and a few questions (eventually to think about). I think I had difficulties to understand classes/orcid/actions/AuthorizeUserData.php and classes/orcid/actions/VerifyAuthorWithOrcid.php -- not the code itself, but how ORCID is functioning there, what everything is how needed to be... I suppose I would need to read and dive deeper into ORCID documentation. However, if you find a way to make it easier for other developers to understand it, e.g. by providing a link to that ORCID API or documentation, it will be great, but no too much worries about it :-) Thanks a lot, great work!

bozana commented 6 months ago

These changes needs to be consider once https://github.com/pkp/pkp-lib/issues/699 is merged: https://github.com/jyhein/orcidProfile/commit/a35e900f7b37f70b2aa1d74f5b32caa997c1f6d3.

ewhanson commented 5 months ago

Hey @bozana, this is finally ready for a review! Would you be able to have a look (complete PRs referenced above)? There are still a few things left to do, but I'd prefer to get these large set of changes merged and complete the rest as separate PRs (outlined below).

Still TODO:

Thanks!

Edit: I've also asked if @jardakotesovec could review the ui-library portion.

jardakotesovec commented 5 months ago

@ewhanson Can you provide some screenshots or overview what orcid functionality this brings?

I see there is orcid setting form on journal/site level.

And than OrcidField is used on contributorForm, which makes it possible to request orcid verification from contributor in Publication section.

How about if user wants link their account to orcid in their profile or during submission? Thats to come later?

ewhanson commented 5 months ago

Hi @jardakotesovec, thanks for having a look. Happy to provide an overview/share some screenshots.

For the most part, this is a direct port of existing plugin functionality into the core with a few tweaks.

Here are the details:

Settings

FieldOrcid

Sending emails to authors requesting they connect their ORCID can happen in a few different ways/places.

OJS 3.3 ORCID plugin contributor ORCID request view

OJS 3.3 ORCID plugin contributor ORCID request view

OJS 3.5 FieldOrcid button in contributor form

OJS 3.5 FieldOrcid button in contributor form

Styles

Other functionality


I think that about covers it. Let me know if anything here is unclear or you have any quesitons!

jardakotesovec commented 5 months ago

@ewhanson Thats great overview, thank you!

The most common way for actual users will likely be via a job that's triggered at various points as a submission moves through the workflow process (e.g. on being accepted, on being published, etc.).

Can you explain this one in more detail? Does it mean that would receive email at some point (accepted/published) that would ask them to verify orcid?

ewhanson commented 5 months ago

Hey @jardakotesovec,

Can you explain this one in more detail? Does it mean that would receive email at some point (accepted/published) that would ask them to verify orcid?

Yes, I actually just checked and I believe the "on publication" aspect needs to be reimplemented (I think it got lost in some refactoring), but the email is sent when the submission is accepted or skips review. You can see that code here: https://github.com/ewhanson/pkp-lib/blob/orcid/classes/observers/listeners/SendAuthorOrcidEmail.php

Edit: Though now that I think about it, I think I'm confusing requesting verification from authors and attempting to deposit works with a user's ORCID profile. I'll review this and make sure it's all reflected in the documentation/consider if it should be added if it wasn't present in the plugin functionality.

ewhanson commented 4 months ago

Merged!

bozana commented 4 months ago

@ewhanson, do we need to open a new issue for the further task(s) we still need or would like to do? E.g. OpenAPI documentation for ORCID API endpoints, consider the comments from the PKP-ORCID Working Group, what to do with old and not verified ORCID iDs in the DB (and consider import/export regarding this), double check/improve the language for some locale keys, e.g. orcid.verify.duplicateOrcid and orcid.verify.duplicateOrcidAuthor, could we provide a solution for a work to be pushed after it is published?... -- those are I know we had on the list, but I am not sure any more about their status, maybe some are already solved... Thanks a lot!