Bug 42002

Summary: SIP screen msg regexp can't be empty
Product: Koha Reporter: Marion Durand <marion.durand>
Component: SIP2Assignee: Pedro Amorim <pedro.amorim>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: pedro.amorim
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 37893    
Bug Blocks:    
Attachments: Bug 42002: Make 'replace' in screen_msg_regex not required
Bug 42002: Make 'replace' in screen_msg_regex not required

Description Marion Durand 2026-03-05 15:09:50 UTC
Before the migration of SIP parameters in the interface, it was possible to delete a message by replacing it with an empty string with the following code:
```
<screen_msg_regex find="Greetings from Koha. " replace="" />
```


It's no longer possible from the interface as the replace field is mandatory (a lot of our library deleted the message "Greetings from Koha. ")
Comment 1 Pedro Amorim 2026-03-05 15:27:02 UTC
Created attachment 194519 [details] [review]
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
Comment 2 Pedro Amorim 2026-03-05 15:28:06 UTC
Hi Marion are you available to test the patch? Thank you.
Comment 3 Marion Durand 2026-03-05 15:32:02 UTC
Thank for the patch that was so quick ! I'll test right away !
Comment 4 Marion Durand 2026-03-05 15:47:47 UTC
Created attachment 194522 [details] [review]
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 <marion.durand@biblibre.com>
Comment 5 Marion Durand 2026-03-05 15:48:45 UTC
All good for me ! Thanks for the lightning fast patch !