eprints / orcid_support_advance

ORCID Support Advance plugin
1 stars 6 forks source link

Import from ORCID defaults #63

Open photomedia opened 2 years ago

photomedia commented 2 years ago

This default setting simply "reverses" the export mappings to create default import mappings: https://github.com/eprints/orcid_support_advance/blob/3ab5570d4b77a64f6ff59ca6156d5b0c9dd6b124/cfg/cfg.d/z_orcid_support_advance.pl#L265 Although that is quick and clever use of "reverse" command, it creates a mapping that is not very good at all. Just because a mapping works in one direction, it doesn't mean it will work in the other. To understand what I mean, just consider that running that "reverse" command on the default export mapping produces this:

{
        "JOURNAL_ARTICLE"       => "article",
        "BOOK_CHAPTER"      => "book_section",
        "BOOK"      => "monograph",
        "CONFERENCE_PAPER"  => "conference_item",
        "BOOK"          => "book",
        "DISSERTATION"      => "thesis",
        "PATENT"        => "patent",
        "OTHER"         => "artefact",
        "OTHER"         => "exhibition",
        "OTHER"         => "composition",
        "ARTISTIC_PERFORMANCE"      => "performance",
        "OTHER"         => "image",
        "OTHER"         => "video",
        "OTHER"         => "audio",
        "DATA_SET"      => "dataset",
        "OTHER"         => "experiment",
        "OTHER" => "teaching_resource",
        "other"         => "OTHER",
};

You see how "OTHER" and "BOOK" is mapped to multiple different types? Which type a BOOK or OTHER actually gets mapped to when this code runs on import from ORCID is anyone's guess :) It works in the other direction because the left side of the mapping contains unique entries. I would recommend changing the default here to something more simple and sensible where the mapping is actually listed, so something like this:

 {
        "JOURNAL_ARTICLE"       => "article",
        "BOOK_CHAPTER"      => "book_section",
        "BOOK"      => "book",
        "CONFERENCE_PAPER"  => "conference_item",
        "DISSERTATION"      => "thesis",
        "DATA_SET"      => "dataset",
                "PATENT"        => "patent",
        "OTHER"         => "other",
        };
photomedia commented 2 years ago

I see that there is a related issue and a fix for this here: https://github.com/eprints/orcid_support_advance/issues/40 Did this make it into the Bazaar plugin?

dennmuel commented 2 years ago

Hi, afaik #52 has not been merged, but we're happily using something like it in production ever since.

wfyson commented 2 years ago

Hello - I've merged in the changes at https://github.com/eprints/orcid_support_advance/pull/52 but they're not yet on the Bazaar.