Save master item when merging
This commit is contained in:
parent
877063e73d
commit
13c4bbebfa
|
@ -741,7 +741,7 @@ Zotero.Items = function() {
|
||||||
|
|
||||||
var replPred = Zotero.Relations.replacedItemPredicate;
|
var replPred = Zotero.Relations.replacedItemPredicate;
|
||||||
var toSave = {};
|
var toSave = {};
|
||||||
toSave[this.id];
|
toSave[item.id] = item;
|
||||||
|
|
||||||
for each(var otherItem in otherItems) {
|
for each(var otherItem in otherItems) {
|
||||||
let otherItemURI = Zotero.URI.getItemURI(otherItem);
|
let otherItemURI = Zotero.URI.getItemURI(otherItem);
|
||||||
|
|
|
@ -27,6 +27,7 @@ describe("Zotero.Items", function () {
|
||||||
assert.isTrue(item2.deleted);
|
assert.isTrue(item2.deleted);
|
||||||
|
|
||||||
// Check for merge-tracking relation
|
// Check for merge-tracking relation
|
||||||
|
assert.isFalse(item1.hasChanged());
|
||||||
var rels = item1.getRelationsByPredicate(Zotero.Relations.replacedItemPredicate);
|
var rels = item1.getRelationsByPredicate(Zotero.Relations.replacedItemPredicate);
|
||||||
assert.lengthOf(rels, 1);
|
assert.lengthOf(rels, 1);
|
||||||
assert.equal(rels[0], item2URI);
|
assert.equal(rels[0], item2URI);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user