Page MenuHomePhabricator

Remove leading PMC from PMC field
Closed, ResolvedPublicBUG REPORT

Description

There are two PMCs in PMC field from this url from the citoid rest service: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4241502/

Event Timeline

The cause of this problem has been identified. Given that

const rePMCID = new RegExp('\\bPMC\\d{7}\\b');

If this condition is satisfied, keyValue[1].trim() must have already contained a 'PMC' prefix. Thus the next line

content.PMCID = `PMC${keyValue[1].trim()}`;

would result in a duplication of the 'PMC' prefix.

Change 513767 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/services/citoid@master] Remove PMC prefix in PMCID field

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

Change 513767 merged by jenkins-bot:
[mediawiki/services/citoid@master] Remove PMC prefix in PMCID field

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

Mvolz triaged this task as Medium priority.
Mvolz removed a project: Patch-For-Review.
Mvolz moved this task from Service to Waiting on Deploy on the Citoid board.