From: Bill Erickson Date: Thu, 22 Oct 2020 15:10:17 +0000 (-0400) Subject: LP1901038 Repair Angular catalog journal title search X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9b89185e24432b78315283fc35e26a852386a08c;p=evergreen%2Ftadl.git 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 --- 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})`;