From 80dc752dab97cf7f8da8b8806cdde84438c0457d Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 5 Mar 2026 15:26:40 +0000 Subject: [PATCH] Bug 42002: Make 'replace' in screen_msg_regex not required Default to empty string if null to ensure that leaving it blank produces the required outcome: the replace value is an empty string Signed-off-by: Marion Durand --- .../js/vue/components/SIP2/SIP2AccountResource.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue index 1a8b06b1ec..b782b3ced4 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2AccountResource.vue @@ -827,7 +827,6 @@ export default { }, { name: "replace", - required: true, indexRequired: true, type: "text", placeholder: "Welcome to your library!", @@ -992,6 +991,15 @@ export default { account.convert_nonprinting_characters = null; } + if (account.screen_msg_regexs) { + account.screen_msg_regexs = account.screen_msg_regexs.map( + item => ({ + ...item, + replace: item.replace ?? "", + }) + ); + } + account.item_fields = account.item_fields?.map( ({ account_id, account_item_field_id, ...rest }) => rest ); -- 2.39.5