Page MenuHomePhabricator

Validate PMID and PMCIDs that are extracted from Zotero's "extra" field in citoid
Closed, ResolvedPublic0 Estimated Story Points

Description

A request for PMC2096233 to the citoid service API adds null as a value for PMID field. (i.e. http://localhost:1970/api?format=mediawiki&search=PMC2096233 ). This is because of the function addPubMedIdentifiers in /lib/Exporter.js extracts the pubmed from Zotero's "extra" field and Zotero returns null as the PMID. We should do basic validation of this field so that 'null' is not added as a PMID to the citation.

Getting started

citoid is a Node.js application (written in JavaScript) that retrieves information about a webpage, book, journal article, etc. given a URL to the webpage or some other identifier, like DOI (digital_object_identifier). It uses another open source project, Zotero's translation-server, also written in JavaScript, to do a lot of the work.

In order to get citoid working on your computer, you'll need to download both Node version 10.0 (for citoid) and xpcshell version 29.0 (for Zotero) to get both of them working. There are installation instructions and more information available at https://www.mediawiki.org/wiki/Citoid

Event Timeline

Josve05a renamed this task from Issues with PMCID to Issues with PMCID 2096233.Oct 30 2016, 9:58 AM
Mvolz renamed this task from Issues with PMCID 2096233 to Validate PMID and PMCIDs that are extracted from Zotero's "extra" field.Jan 11 2017, 4:45 PM
Mvolz added a subscriber: Mvolz.

Looks like the "null" is in the Zotero results, and we just happily accept that as a valid value :). We should validate that.

This comment was removed by Mvolz.

Date issue is separate, tracking here: T153788

Mvolz triaged this task as Low priority.Jan 11 2017, 4:55 PM
Mvolz updated the task description. (Show Details)
Mvolz renamed this task from Validate PMID and PMCIDs that are extracted from Zotero's "extra" field to Validate PMID and PMCIDs that are extracted from Zotero's "extra" field in citoid.Jan 12 2017, 5:27 AM
Mvolz updated the task description. (Show Details)

Change 331879 had a related patch set uploaded (by Filip):
Added "null" check to "addPubMedIndentifiers"

https://gerrit.wikimedia.org/r/331879

This comment was removed by Filip.

@Mvolz: Made patch implementing this. Looks like a much better solution! Thanks!

Change 331879 merged by jenkins-bot:
Added verification to PMCID and PMID parameters in "addPubMedIndentifiers"

https://gerrit.wikimedia.org/r/331879

Marking as resolved!

mobrovac added a subscriber: mobrovac.

Reopening just until this is actually deployed in production.