Bug 37075 - Message queue processor will fail to send any message unless letter_code is passed
Summary: Message queue processor will fail to send any message unless letter_code is p...
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low critical
Assignee: Kyle M Hall (khall)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 21322
Blocks:
  Show dependency treegraph
 
Reported: 2024-06-12 13:00 UTC by Kyle M Hall (khall)
Modified: 2024-11-18 16:26 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:


Attachments
Bug 37075: Message queue processor will fail to send any message unless letter_code is passed (1.46 KB, patch)
2024-06-12 13:09 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 37075: Message queue processor will fail to send any message unless letter_code is passed (1.51 KB, patch)
2024-06-13 22:33 UTC, David Nind
Details | Diff | Splinter Review
Bug 37075: Message queue processor will fail to send any message unless letter_code is passed (1.58 KB, patch)
2024-06-14 10:45 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2024-06-12 13:00:50 UTC
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.
Comment 1 Kyle M Hall (khall) 2024-06-12 13:09:29 UTC
Created attachment 167655 [details] [review]
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!
Comment 2 David Nind 2024-06-13 22:33:17 UTC
Created attachment 167704 [details] [review]
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>
Comment 3 Martin Renvoize (ashimema) 2024-06-14 10:45:17 UTC
Created attachment 167710 [details] [review]
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>
Comment 4 Martin Renvoize (ashimema) 2024-06-14 10:49:41 UTC
Weird, but documented behaviour for GetOptions.

Passing QA
Comment 5 Katrin Fischer 2024-06-21 13:04:34 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Lucas Gass (lukeg) 2024-11-18 16:26:49 UTC
Backported to 24.05.x for upcoming 24.05.06