Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to ExportToOrcid.pm #6

Closed
GFournie opened this issue Jun 13, 2018 · 2 comments
Closed

Improvements to ExportToOrcid.pm #6

GFournie opened this issue Jun 13, 2018 · 2 comments

Comments

@GFournie
Copy link

@GFournie GFournie commented Jun 13, 2018

Hi,

In action_export, the write_orcid_record() result is tested for success with "$result->is_success()" and then behaves as if all the records have been successfully written.

But that not always the case. For example, if I export two eprints (with one of them already in orcid), $result->is_success() returns "true" even if only one export has been successful.

The result->content() must be analysed to know exactly what was happened...

<bulk:bulk ...>

    <error:error>
        <error:response-code>409</error:response-code>
        <error:developer-message>409 Conflict: You have already added this activity (matched by external identifiers.) If you are trying to edit the item, please use PUT instead of POST.</error:developer-message>
        <error:user-message>There was an error when updating the record. ...</error:user-message>
        <error:error-code>9021</error:error-code>
        <error:more-info>https://members.orcid.org/api/resources/troubleshooting</error:more-info>
    </error:error>

    <work:work put-code="932853" visibility="public">
        <common:created-date>2018-06-12T13:24:28.322Z</common:created-date>
        ...
    </work:work>

</bulk:bulk>

So, there were a successful export (work:work) and an unsuccessful one (error:error). To replace an item a PUT request must be issued instead of POST. And the put-code given with a successful import has to be given in the PUT request (so it should possibly need a new "orcid_put_code" field in the eprint dataset to store this value).

As is, the plugin is not able toi update records. Do you intend to improve ExportToOrcid.pm to make the update possible ?

(Anyway, the plugin is really very useful and, when updates are needed, users can delete records in Orcid before exporting them again from eprints. Not really optimal, but it is a working solution... Many thanks for your work!)

@dennmuel
Copy link
Contributor

@dennmuel dennmuel commented Aug 24, 2018

We're facing the same problem with our instance. If we find a solution, we'll get back to this issue with a PR. (Probably not before the midth of September though...)
Also - if desired - we could provide some code to export more information to orcid (like language, ISBN)

Edit: Discussion about how to save the putcode in #12 .

@dennmuel dennmuel mentioned this issue Sep 26, 2018
@dennmuel
Copy link
Contributor

@dennmuel dennmuel commented Jan 3, 2019

I think this issue can be closed now (fixed with v.1.5).

@wfyson wfyson closed this May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants