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

Add a UI for adding identifiers to authors #853

Closed
mekarpeles opened this issue Mar 13, 2018 · 15 comments · Fixed by #5093
Closed

Add a UI for adding identifiers to authors #853

mekarpeles opened this issue Mar 13, 2018 · 15 comments · Fixed by #5093
Labels
Affects: Data Issues that affect book/author metadata or user/account data. [managed] hacktoberfest Issues appropriate for Hacktoberfest participants Module: Authors Priority: 2 Important, as time permits. [managed] Theme: Design Issues related to UI design, branding, etc. [managed] Theme: Identifiers Issues related to ISBN's or other identifiers in metadata. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed]
Milestone

Comments

@mekarpeles
Copy link
Member

mekarpeles commented Mar 13, 2018

Related: #144 on the backend -- this added the following fields to Authors, in JSON:

remote_ids: {
   viaf: "305232897",
   wikidata: "Q888254",
   isni: "0000000027362838"
}

Which are displayed and formatted as links currently on the Author pages, e.g. https://openlibrary.org/authors/OL1102082A under the heading "Links (outside Open Library)"

The missing piece is a field in the Author edit form for users to add these ids.

@mekarpeles mekarpeles added design Module: Authors Theme: Identifiers Issues related to ISBN's or other identifiers in metadata. [managed] labels Mar 13, 2018
@mekarpeles mekarpeles changed the title An edit UI for adding authority control: VIAF and Wikidata ids, Adding ISNI, Wikidata bot An edit UI for adding authority control: VIAF and Wikidata ids, Adding ISNI Mar 13, 2018
@mekarpeles mekarpeles added this to @hornc in 2018 Q2 Mar 13, 2018
@hornc hornc added the Good First Issue Easy issue. Good for newcomers. [managed] label Feb 27, 2019
@ayushshivani
Copy link

@mekarpeles I would like to work on this. Can you please explain a little bit more?

@LeadSongDog
Copy link

LeadSongDog commented Mar 28, 2019

@ayushshivani
There are several things that could play into this. It doesn't need to be perfect to be an improvement, but here are some things I'd suggest from a librarian-user perspective:

The manual editing interface presently allows the user to paste or drag/drop generic html links to these sources. Such links should be automatically recognized and stripped down, to store just the identifier.

It should also be possible to simply paste the identifier into a form, including over an existing value.

Before storing an id (or deleting a previous value) there should be a check that the target record exists and that it corresponds to the OLID author record (at least one name in common to both records, and non-conflicting lifespan dates, perhaps with some slop allowed).

The fetched ISNI records fetched usually include the corresponding VIAF and Wikidata ids. If these do not conflict with an existing value at the OLID target, then they should also be stored there.

The ISNI record will provide variant names for the author. These should be added to the OLID target as a.k.a. entries. This will eventually greatly aid author merging.

Ultimately much of this could be done as a bot cleanup task, but for now making the manual approach work better will be a great help.

Thank you for taking this on.

@cdrini cdrini changed the title An edit UI for adding authority control: VIAF and Wikidata ids, Adding ISNI Add a UI for adding identifiers to authors Mar 29, 2019
@cdrini
Copy link
Collaborator

cdrini commented Mar 29, 2019

@LeadSongDog This ticket has a slightly smaller focus (renamed accordingly). The error checking would be useful, but I think this is just for the first step of adding a UI.

Currently, when you edit an edition, you get the option to add identifiers to other sites:

image
(src)

This scope of this ticket is to add a similar interface (ideally re-using as much of this code as possible) to author pages.

@LeadSongDog
Copy link

There is an edit interface for author links:
authlinks

But the identifiers (as opposed to full urls) don't always show up there:
author

In the link box, I can copypaste the URL for an ISNI or VIAF page, and title it "ISNI" or "VIAF"
I'd like to see both kinds of edit work, with just the identifier needing to be stored.

@bnewbold
Copy link
Member

For what it's worth, I just spoke with some editors at Wikimania (a Wikipedia/Wikimedia event) who are interested in contributing corrections to VIAF and Wikidata identifier linkages on Open Library.

@tfmorris
Copy link
Contributor

tfmorris commented Aug 21, 2019

In the link box, I can copypaste the URL for an ISNI or VIAF page, and title it "ISNI" or "VIAF"
I'd like to see both kinds of edit work, with just the identifier needing to be stored.

@LeadSongDog That's a good goal, but not the focus of this ticket. Let's avoid scope creep.

This ticket is about an identifier edit interface for 3 new author identifiers: Wikidata, VIAF, & ISNI.

Other possible, related, future tickets include:

  • enhancing the edit link functionality to recognize links which should be converted to identifiers (Accept full URLs any place an identifier can be entered #866)
  • a data cleanup task to convert all existing links which should instead be identifiers
  • a periodic sync/update job to track changes in one or more remote systems

For what it's worth, I just spoke with some editors at Wikimania (a Wikipedia/Wikimedia event) who are interested in contributing corrections to VIAF and Wikidata identifier linkages on Open Library.

@bnewbold That's excellent, but I think the way that we maximize the efficiency of Wiki* volunteers is to allow them to work in familiar surroundings (ie Wikidata). If we use Wikidata as the central source of truth for all identifiers, we can focus everyone's effort on making sure that is correct. OpenLibrary can then import VIAF, ISNI, Wikipedia, ORCID, etc identifiers/links from there.

As a stopgap, in the interim, we'll have the edit interface proposed by this ticket.

@bnewbold
Copy link
Member

bnewbold commented Sep 3, 2019

@tfmorris ah, interesting. The way I had envisioned "wikidata as central source of identifier truth" working was that openlibrary entities would have a wikidata QID tag, and then an openlibrary bot/script would use that to do lookups (by wikidata QID), fetch identifiers (and other metadata), then update openlibrary. In this case the onus would be on openlibrary to maintain mappings to wikidata. But I guess you are saying the bot would do lookups based on the openlibrary identifier in wikidata and pull updates based on that.

To clarify my above comment, I think the Wiki* editors were really mostly concerned/interested in pushing Wikidata identifier linkage, more than VIAF or other identifiers. Partially, as a mechanism to drive openlibrary visitors through to wikidata (and/or wikipedia articles) as a source of additional information about entities. This isn't possible if the mapping only exists on the wikidata side. I don't have any horse in that race.

Anyways, that's all a bit off topic. Regardless what the desired future workflow is, seems important to allow manual correction/editing of identifiers on openlibrary via the web interface.

@tabshaikh tabshaikh added the hacktoberfest Issues appropriate for Hacktoberfest participants label Sep 27, 2019
@tabshaikh tabshaikh added this to the Hacktoberfest milestone Sep 27, 2019
@tabshaikh tabshaikh added this to To do in Hacktoberfest Sep 27, 2019
@xayhewalo xayhewalo added this to Un-Triaged in Triage Oct 20, 2019
@xayhewalo xayhewalo added Affects: Data Issues that affect book/author metadata or user/account data. [managed] Priority: 2 Important, as time permits. [managed] State: Backlogged and removed design labels Nov 22, 2019
@xayhewalo xayhewalo added Theme: Design Issues related to UI design, branding, etc. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] labels Nov 22, 2019
@xayhewalo xayhewalo moved this from Un-Triaged to Triaged in Triage Nov 22, 2019
@xayhewalo xayhewalo moved this from Triaged to Needs: Assessment in Triage Nov 22, 2019
@BrittanyBunk
Copy link
Contributor

BrittanyBunk commented Dec 17, 2019

I'm adding LCCN and OL to the ones mentioned. Would it be ok for someone to make a list of all the ones mentioned so far? Here it is:
Wikidata, ISNI, VIAF, LCCN, OLID, ORCID

@BrittanyBunk
Copy link
Contributor

what is "Classifications: RM666.T65, 616.12061" http://worldcat.org/identities/lccn-n82039404/ is this the VIAF?

@LeadSongDog
Copy link

LeadSongDog commented Dec 17, 2019

@BrittanyBunk I've updated https://github.com/internetarchive/openlibrary/wiki/Guide-to-Identifiers for your reading pleasure, but it doesn't get into classifications.

RM666.T65 is the LC Class for "Theraputics, Vitamin E" while 616.12061 is the Dewey Decimal Class for "Cardiopulmonary Drug Therapies" both of which would reasonably be applied to https://www.worldcat.org/title/vitamin-e-for-ailing-and-healthy-hearts/oclc/488728428

It's easy to tell DDC from LC Classifications, they're all-numeric.

@SudarshanHV
Copy link

SudarshanHV commented Mar 9, 2020

Is this issue open or is it allotted to somebody as of now?
If it not allotted, I would like to contribute

@BrittanyBunk
Copy link
Contributor

BrittanyBunk commented Mar 10, 2020

@SudarshanHV I accidentally created a duplicate of this issue - so this is still open and an issue. You could tell that it still exists, because the layout for author pages is still a work in progress from when I last checked. You could see the issue I brought up #2786 to find out more. I think you're right though about working on this - so that'll be my next task.

@mekarpeles mekarpeles removed the Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] label Apr 20, 2020
@xayhewalo xayhewalo added the Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] label May 3, 2020
@eduardoltorres
Copy link
Contributor

Hey @BrittanyBunk! 👋 do you need any help with this?

@BrittanyBunk
Copy link
Contributor

Hey @BrittanyBunk! do you need any help with this?

Yes - the author roles are not alphabetized. It would also be nice if they're categorized. It's also sad that we can't add anymore role names. Why do we need a drop-down menu?

If you could remove the drop-down menu and instead let people fill in whatever they need to - that would be ideal!

@mekarpeles mekarpeles removed the Good First Issue Easy issue. Good for newcomers. [managed] label Jan 25, 2021
@RayBB
Copy link
Collaborator

RayBB commented Apr 24, 2021

Here is the code for how this currently works with editions:

<fieldset class="major" id="identifiers">
<legend>$_("ID Numbers")</legend>
<div class="formBack">
<div id="id-errors" class="note" style="display: none"></div>
<div class="formElement">
<div class="label">
<label for="select-id">$_("Do you know any identifiers for this edition?")</label>
<span class="tip">$_("Like, ISBN?")</span>
</div>
<div class="input">
<table class="identifiers">
<tr id="identifiers-form">
<td align="right">
<select name="name" id="select-id">
$ id_labels = dict((d.name, d.label) for d in edition_config.identifiers)
$ id_dict = dict((id.name, id) for id in edition_config.identifiers)
$ popular = ["ocaid", "isbn_10", "isbn_13", "lccn", "oclc_numbers", "goodreads", "librarything"]
$ set1 = [id_dict[name] for name in popular if name in id_dict]
$ set2 = sorted([id for id in edition_config.identifiers if id.name not in popular], key=lambda id:id.label)
<option value="">Select one of many...</option>
$for id in set1:
<option value="$id.name">$id.label</option>
<optgroup label="----------"></optgroup>
$for id in set2:
<option value="$id.name">$id.label</option>
<!-- <option>---</option> -->
<!-- <option value="__add__">Add a new ID type</option> -->
</select>
</td>
<td>
<input type="text" name="value" id="id-value"/>
</td>
<td>
<button type="button" name="add" class="repeat-add larger">$_("Add")</button>
</td>
</tr>
<tbody id="identifiers-display">
<tr id="identifiers-template" style="display: none;" class="repeat-item">
<td align="right"><strong>{{\$("#select-id").find("option[value=" + name + "]").html()}}</strong></td>
<td width="380">{{value}}
<input type="hidden" name="{{prefix}}identifiers--{{index}}--name" value="{{name}}"/>
<input type="hidden" name="{{prefix}}identifiers--{{index}}--value" value="{{value}}"/>
</td>
<td><a href="javascript:;" class="repeat-remove red plain" title="Remove this identifier">[x]</a></td>
</tr>
<tr>
<td align="right">Open Library</td>
<td>$book.key.split("/")[-1]</td>
<td></td>
</tr>
$for i, id in enumerate(book.get_identifiers().values()):
<tr id="identifiers--$i" class="repeat-item">
<td align="right"><strong>$id_labels.get(id.name, id.name)</strong></td>
<td>$id.value
<input type="hidden" name="edition--identifiers--${i}--name" value="$id.name"/>
<input type="hidden" name="edition--identifiers--${i}--value" value="$id.value"/>
</td>
$# Disable removing ocaid for regular users.
$ admin_user = ctx.user and (ctx.user.is_admin() or ctx.user.is_librarian())
$if id.name == "ocaid" and not admin_user:
<td></td>
$else:
<td><a href="javascript:;" class="repeat-remove red plain" title="Remove this identifier">[x]</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</fieldset>

This is the file to edit to add the new code: https://github.com/internetarchive/openlibrary/blob/eddaa125d1ace42805ea1bc32fcd11d8aeff7603/openlibrary/templates/type/author/edit.html

I'm thinking of picking up this ticket and feel like it may be a good use case for Vue (which I am familiar with) since in some future we may want to parse IDs from URLs and giving visual feedback for that is nice. That being said, since #3828 I don't see many (any?) uses of Vue. I'm going to try to follow this doc and see where I get.

Any tips, thoughts, or warnings? I'm going to try to keep it simple and just follow this comment with the ability to add/change just three identifiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Data Issues that affect book/author metadata or user/account data. [managed] hacktoberfest Issues appropriate for Hacktoberfest participants Module: Authors Priority: 2 Important, as time permits. [managed] Theme: Design Issues related to UI design, branding, etc. [managed] Theme: Identifiers Issues related to ISBN's or other identifiers in metadata. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed]
Projects
No open projects
2018 Q2
  
@hornc
Hacktoberfest
  
To do
Triage
  
Needs: Assessment
Development

Successfully merging a pull request may close this issue.