Show author names in natural order everywhere
Names read from MARC personal-name fields are stored as "Steve Allen", and names already stored as "Allen, Steve" are shown and printed in natural order. Search matches both forms. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
7ae1bcef0a
commit
60fa4ef6f7
17 files changed
+183
-15
No files matched your search
@@ -275,6 +275,16 @@ test('print order and the book list break identical sort keys by author surname,
|
||||
assert.deepEqual(pdfCalls[0]!.cards.map((c) => c.title), ['Day hikes', 'Sierra South', 'Alpine', 'Zebra trails']);
|
||||
});
|
||||
|
||||
test('cards print stored author names in natural order', async () => {
|
||||
const { req, db, pdfCalls } = setup();
|
||||
db.insertPending({
|
||||
title: 'Canyoneering 2', authors: ['Allen, Steve', 'Wilderness Press, Inc.'], callNumber: 'GV199.42 2020', sortKey: 'GV 0199.42 2020',
|
||||
confidence: 'approximate', source: 'ol-edition', status: 'resolved', manualOverride: false, inQueue: true,
|
||||
});
|
||||
assert.equal((await req('GET', '/api/print.pdf')).status, 200);
|
||||
assert.deepEqual(pdfCalls[0]!.cards[0]!.authors, ['Steve Allen', 'Wilderness Press, Inc.']);
|
||||
});
|
||||
|
||||
test('a search result\'s LCCN (work-level) is not saved onto the book', async () => {
|
||||
const { req } = setup();
|
||||
const f = await (await req('POST', '/api/books/from-search', { result: { title: 'Hit', authors: ['X'], lccn: '96067014', lcc: [] } })).json() as any;
|
||||
|
||||
Reference in new issue
Block a user