Opened 10 years ago
Closed 10 years ago
#301 closed defect (fixed)
COinS bugs/enhancements
| Reported by: | dcohen | Owned by: | simon |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.0.0 |
| Component: | ingester | Version: | 1.0 |
| Keywords: | Cc: |
Description
From Rick Karnesky of Northwestern Univ, a COinS pro:
- pages aren't correctly handled (records with spage and epage have only epage placed in pages, for example)
- Stored dois incorrectly include the "info:doi/" prefix
- for articles, rft.title should be placed in "Publication"
- rft.stitle can be placed in "Journal Abbr"
- rft_id=http://.... can be used for "URL"
- rft.issn can be used for "ISSN"
- It'd be nice to allow for the types permitted by OpenURL (dissertations (for which there is a current type in Zotero), patents, Dublin Core links and other formats).
Change History (8)
comment:1 Changed 10 years ago by simon
comment:2 Changed 10 years ago by simon
- Milestone changed from 1.0 Beta 2 to 1.0 Final
comment:3 Changed 10 years ago by simon
- Resolution set to fixed
- Status changed from new to closed
comment:4 Changed 10 years ago by snosons
- Type changed from enhancement to defect
I think that by closing this bug, another one was introduced.
In ingester.js:
// encode subsequent creators as au
for each(creator in item.creators) {
co += _mapTag((creator.firstName ? creator.firstName+" " : "")+creator.lastName, (item.itemType == "patent" ? "inventor" : "au"), version);
}
The above code loops through all item.creators, even the one that was already set as firstCreator. That is, the output will be: aufirst=Joe&aulast=Smith&au=Joe Smith.
This creates a redundancy that, when put in a COinS, prevents Zotero from reading the page.
Putting in a check for:
if(creator != firstCreator)
would fix this.
comment:5 Changed 10 years ago by simon
- Resolution fixed deleted
- Status changed from closed to reopened
If Zotero isn't reading the page properly, that's a bug. The redundant encoding of the primary author is identical to the behavior of the COinS Generator.
comment:6 Changed 10 years ago by snosons
Ah, good point.
I think I found the parsing culprit, however.
Line 549 of ingester.js:
pAu.substr(0, au.firstName.length) == au.firstName))) {
should be
pAu.firstName.substr(0, au.firstName.length) == au.firstName))) {
Otherwise, a TypeError gets thrown, stopping the page from rendering, because pAu doesn't have a substr method.
comment:7 Changed 10 years ago by snosons
Also, in ingester.js, on line 554
if(pushMe) item.creators.push(au);
I think unshift would be better
if(pushMe) item.creators.unshift(au);
because it would put the primary author at the head of the list.
I ran into this at http://arc.nucapt.northwestern.edu/refbase/show.php?record=279
"Amano, Jun" is listed first in COinS (he has aufirst, etc), but in Zotero, he is listed last.
comment:8 Changed 10 years ago by simon
- Resolution set to fixed
- Status changed from reopened to closed
fixed in r1240; still using push() instead of unshift() because the reason the given example is not ordered properly is that RefBase puts the last author at the beginning of the Z39.88 contextObject. There is no real standard here, but it seems logical that the first author should appear first in said contextObject.
(In [674]) addresses #301, COinS bugs/enhancements; remaining issue blocked by #3 (add as many item types as possible)