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

Import from ORCID defaults #63

Open
photomedia opened this issue Mar 25, 2022 · 3 comments
Open

Import from ORCID defaults #63

photomedia opened this issue Mar 25, 2022 · 3 comments

Comments

@photomedia
Copy link

photomedia commented Mar 25, 2022

This default setting simply "reverses" the export mappings to create default import mappings:

my %work_types = reverse %{$c->{"plugins"}{"Screen::ExportToOrcid"}{"params"}{"work_type"}};

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
Copy link
Author

I see that there is a related issue and a fix for this here: #40 Did this make it into the Bazaar plugin?

@dennmuel
Copy link
Contributor

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

@wfyson
Copy link
Collaborator

wfyson commented Apr 7, 2022

Hello - I've merged in the changes at #52 but they're not yet on the Bazaar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants