From 9b89185e24432b78315283fc35e26a852386a08c Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 22 Oct 2020 11:10:17 -0400 Subject: [PATCH] LP1901038 Repair Angular catalog journal title search Completes the Journal Title search implementation in the Angular staff catalog. To test in concerto, search Journal Title => IEEE. Signed-off-by: Bill Erickson Signed-off-by: Chris Sharp --- Open-ILS/src/eg2/src/app/share/catalog/search-context.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/share/catalog/search-context.ts b/Open-ILS/src/eg2/src/app/share/catalog/search-context.ts index 72683c1de8..d94e5e2721 100644 --- a/Open-ILS/src/eg2/src/app/share/catalog/search-context.ts +++ b/Open-ILS/src/eg2/src/app/share/catalog/search-context.ts @@ -513,12 +513,14 @@ export class CatalogSearchContext { let query = ts.query[idx]; const joinOp = ts.joinOp[idx]; const matchOp = ts.matchOp[idx]; - const fieldClass = ts.fieldClass[idx]; + let fieldClass = ts.fieldClass[idx]; // Bookplates are filters but may be displayed as regular // text search indexes. if (fieldClass === 'bookplate') { return ''; } + if (fieldClass === 'jtitle') { fieldClass = 'title'; } + let str = ''; if (!query) { return str; } @@ -621,6 +623,13 @@ export class CatalogSearchContext { } }); + // Journal Title queries means performing a title search + // with a filter. Filters are global, so append to the front + // of the query. + if (ts.fieldClass.filter(fc => fc === 'jtitle').length > 0) { + str = 'bib_level(s) ' + str; + } + if (ts.hasBrowseEntry) { // stored as a comma-separated string of "entryId,fieldId" str += ` has_browse_entry(${ts.hasBrowseEntry})`; -- 2.11.0