Fix sorting of base-mapped fields in reports
This commit is contained in:
parent
b9d7992ba8
commit
5b267b4264
|
@ -417,12 +417,11 @@ function ChromeExtensionHandler() {
|
||||||
valA = Zotero.Items.getSortTitle(valA);
|
valA = Zotero.Items.getSortTitle(valA);
|
||||||
valB = Zotero.Items.getSortTitle(valB);
|
valB = Zotero.Items.getSortTitle(valB);
|
||||||
}
|
}
|
||||||
// Use multipart date -- would be better just to get
|
|
||||||
// the unformatted date value directly, but toArray(),
|
|
||||||
// which we currently use above, doesn't do that
|
|
||||||
else if (sorts[index].field == 'date') {
|
else if (sorts[index].field == 'date') {
|
||||||
valA = Zotero.Date.strToMultipart(a[sorts[index].field]);
|
var itemA = Zotero.Items.getByLibraryAndKey(a.libraryID, a.key);
|
||||||
valB = Zotero.Date.strToMultipart(b[sorts[index].field]);
|
var itemB = Zotero.Items.getByLibraryAndKey(b.libraryID, b.key);
|
||||||
|
valA = itemA.getField('date', true, true);
|
||||||
|
valB = itemB.getField('date', true, true);
|
||||||
}
|
}
|
||||||
// TEMP: This is an ugly hack to make creator sorting
|
// TEMP: This is an ugly hack to make creator sorting
|
||||||
// slightly less broken. To do this right, real creator
|
// slightly less broken. To do this right, real creator
|
||||||
|
|
Loading…
Reference in New Issue
Block a user