From 4bbc1077b0b3ad161dc265d056b9dbc426fc30c2 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 5 May 2023 12:15:36 -0400 Subject: [PATCH] Adjust the default to use the current "All Parts" behavior, and set a code-level default in case of an accidental delete Signed-off-by: Mike Rylander --- Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts | 4 ++-- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 2 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 2 +- Open-ILS/src/sql/Pg/upgrade/YYYY.schema.eparts.sql | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts index e7ddb7f725..884f34fe14 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts @@ -71,7 +71,7 @@ export class HoldComponent implements OnInit { activeDateYmd: string; activeDate: Date; activeDateInvalid = false; - anyPartLabel: string; + anyPartLabel = 'All Parts'; holdContexts: HoldContext[]; recordSummaries: BibRecordSummary[]; @@ -170,7 +170,7 @@ export class HoldComponent implements OnInit { } }); - this.pcrud.retrieve('i18ns', 1) // Any Part + this.pcrud.retrieve('i18ns', 1) // Seed data default is: All Parts .subscribe(i18n_string => { this.anyPartLabel = i18n_string.string(); }); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 3003a9f842..7738f5817e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -1508,7 +1508,7 @@ sub load_place_hold { my $any_part_label = $self->editor->retrieve_config_i18n_string([1, {}]); $any_part_label = $any_part_label->string if $any_part_label; - $ctx->{any_part_label} = $any_part_label; + $ctx->{any_part_label} = $any_part_label || 'All Parts'; $ctx->{staff_recipient} = $self->editor->retrieve_actor_user([ $e->requestor->id, { diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 7cb0f43f6e..6e4307f4b5 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -18963,7 +18963,7 @@ INSERT INTO config.i18n_core (fq_field, identity_value, translation, string ) AND t.xlate IS NOT NULL AND t.name <> (xlate->value); -INSERT INTO config.i18n_string (id, context, string) VALUES (1, 'In the Place Hold interfaces for staff and patrons, when monographic parts are available, this would be the option for indicating that no specific part is being requested.', 'Any Part'); +INSERT INTO config.i18n_string (id, context, string) VALUES (1, 'In the Place Hold interfaces for staff and patrons; when monographic parts are available, this string provides contextual information about whether and how parts are consider for holds that do not request a specific mongraphic part.', 'All Parts'); INSERT INTO authority.heading_field(heading_type, heading_purpose, label, heading_xpath, component_xpath, type_xpath, thesaurus_xpath, thesaurus_override_xpath) VALUES ( 'topical_term', 'main', 'Main Topical Term', '/mads21:mads/mads21:authority', '//mads21:topic', NULL, '/mads21:mads/mads21:authority/mads21:topic[1]/@authority', NULL ) diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.schema.eparts.sql b/Open-ILS/src/sql/Pg/upgrade/YYYY.schema.eparts.sql index 4c3fa76aa8..ecee9cdec6 100644 --- a/Open-ILS/src/sql/Pg/upgrade/YYYY.schema.eparts.sql +++ b/Open-ILS/src/sql/Pg/upgrade/YYYY.schema.eparts.sql @@ -14,6 +14,6 @@ CREATE TABLE config.i18n_string ( -- 950.data.seed-values.sql -INSERT INTO config.i18n_string (id, context, string) VALUES (1, 'In the Place Hold interfaces for staff and patrons, when monographic parts are available, this would be the option for indicating that no specific part is being requested.', 'Any Part'); +INSERT INTO config.i18n_string (id, context, string) VALUES (1, 'In the Place Hold interfaces for staff and patrons; when monographic parts are available, this string provides contextual information about whether and how parts are consider for holds that do not request a specific mongraphic part.', 'All Parts'); COMMIT; -- 2.11.0