duplicateAndConvertSelectedItem: Don't copy abstracts (#2799)
This commit is contained in:
parent
b646073dfa
commit
63864f2f86
2 changed files with 12 additions and 0 deletions
|
@ -1853,6 +1853,8 @@ var ZoteroPane = new function()
|
||||||
duplicate.setCreators(creators);
|
duplicate.setCreators(creators);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
duplicate.setField('abstractNote', '');
|
||||||
|
|
||||||
duplicate.addRelatedItem(original);
|
duplicate.addRelatedItem(original);
|
||||||
original.addRelatedItem(duplicate);
|
original.addRelatedItem(duplicate);
|
||||||
|
|
||||||
|
|
|
@ -467,6 +467,16 @@ describe("ZoteroPane", function() {
|
||||||
assert.sameMembers(bookSectionItem2.relatedItems, [bookItem.key, otherBookSection.key]);
|
assert.sameMembers(bookSectionItem2.relatedItems, [bookItem.key, otherBookSection.key]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should not copy abstracts", async function() {
|
||||||
|
await selectLibrary(win);
|
||||||
|
var bookItem = await createDataObject('item', { itemType: 'book', title: "Book Title" });
|
||||||
|
bookItem.setField('abstractNote', 'An abstract');
|
||||||
|
bookItem.saveTx();
|
||||||
|
|
||||||
|
var bookSectionItem = await zp.duplicateAndConvertSelectedItem();
|
||||||
|
assert.isEmpty(bookSectionItem.getField('abstractNote'));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue