Bug 37075: Message queue processor will fail to send any message unless letter_code is passed

For reasons unknown, GetOptions is inserting an empty string into the letter_code list. If you are running the script with a letter code filter, the empty string is added to the OR so it functions. If no letter_code is passed, the search requires the letter code to be an empty string, which will of course fail. Even more perplexing is that this does not happen for the type list which is essentially identical code.

Test Plan:
1) Generate some messages in the message queue
2) Run `process_message_queue.pl -v -c`
3) Note nothing happens
4) Apply this patch
5) Repeat step 2
6) Messages are sent!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a6eab64e53)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2024-06-12 09:05:53 -04:00 committed by Lucas Gass
parent d7499750f1
commit fc09b18ea2
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,9 @@ catch {
cronlogaction({ info => $command_line_options });
# Remove empty elements, see bug 37075
@letter_code = grep { $_ ne q{} } @letter_code;
if ( C4::Context->config("enable_plugins") ) {
my @plugins = Koha::Plugins->new->GetPlugins({
method => 'before_send_messages',