Use best first creator for OpenURL author, not just first position
This also fixes Google Scholar Search lookup to use an author not in first creator position [1]. [1] https://forums.zotero.org/discussion/58384/
This commit is contained in:
parent
83d11947ff
commit
599598566b
3 changed files with 48 additions and 1 deletions
23
test/tests/openurlTest.js
Normal file
23
test/tests/openurlTest.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
"use strict";
|
||||
|
||||
describe("Zotero.OpenURL", function() {
|
||||
describe("#createContextObject()", function () {
|
||||
it("should use firstCreator for author", function* () {
|
||||
var item = createUnsavedDataObject('item');
|
||||
item.setCreators([
|
||||
{
|
||||
firstName: "Aaa",
|
||||
lastName: "Editor",
|
||||
creatorType: 'editor'
|
||||
},
|
||||
{
|
||||
firstName: "Bbb",
|
||||
lastName: "Author",
|
||||
creatorType: 'author'
|
||||
}
|
||||
]);
|
||||
var co = Zotero.OpenURL.createContextObject(item, "1.0");
|
||||
assert.include(co, '&rft.aufirst=Bbb&rft.aulast=Author&');
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue