Bugzilla – Attachment 183460 Details for
Bug 23883
sip_cli_emulator.pl - typo in parameter name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23883: sip_cli_emulator.pl should display real parameter names
Bug-23883-sipcliemulatorpl-should-display-real-par.patch (text/plain), 2.43 KB, created by
Marcel de Rooy
on 2025-06-24 14:13:56 UTC
(
hide
)
Description:
Bug 23883: sip_cli_emulator.pl should display real parameter names
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-06-24 14:13:56 UTC
Size:
2.43 KB
patch
obsolete
>From 6b6fc6dfaf397efc50f86f42032d7bc86a9a763d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 13 Jun 2025 16:49:18 -0300 >Subject: [PATCH] Bug 23883: sip_cli_emulator.pl should display real parameter > names >Content-Type: text/plain; charset=utf-8 > >For creating this patch I looked at all parameters defined in the >handler mapping, removed duplicated ones and tracked down which ones >really were parameters in `GetOptions`. This included tracking down >variables that were later assigned other values and things like that. > >The mapping is used to display the right parameter name if missing a >mandatory one. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/sip_cli_emulator.pl | 28 +++++++++++++++++++++++++++- > 1 file changed, 27 insertions(+), 1 deletion(-) > >diff --git a/misc/sip_cli_emulator.pl b/misc/sip_cli_emulator.pl >index a09ed952c6..da352c52fe 100755 >--- a/misc/sip_cli_emulator.pl >+++ b/misc/sip_cli_emulator.pl >@@ -306,6 +306,31 @@ my $handlers = { > }, > }; > >+my $param_to_cli = { >+ currency_type => 'currency-type', >+ current_location => 'location', >+ end_item => 'end-item', >+ fee_acknowledged => 'fee-acknowledged', >+ fee_amount => 'fee-amount', >+ fee_identifier => 'fee-identifier', >+ fee_type => 'fee-type', >+ hold_mode => 'hold-mode', >+ institution_id => 'location', >+ item_identifier => 'item', >+ location_code => 'location', >+ login_password => 'sip_pass', >+ login_user_id => 'sip_user', >+ no_block => 'no-block', >+ patron_identifier => 'patron', >+ patron_password => 'password', >+ payment_type => 'payment-type', >+ pickup_location => 'pickup-location', >+ start_item => 'start-item', >+ summary => 'summary', >+ terminal_password => 'sip_pass', >+ transaction_id => 'transaction-id', >+}; >+ > my $data = run_command_message('login'); > > if ( $data =~ '^941' ) { ## we are logged in >@@ -335,7 +360,8 @@ sub build_command_message { > foreach my $key ( keys %$parameters ) { > unless ( $parameters->{$key} ) { > unless ( $optional{$key} ) { >- say "$key is required for $message"; >+ my $param_name = $param_to_cli->{$key} // $key; >+ say "$param_name is required for $message"; > return; > } > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23883
:
96374
|
96382
|
183252
|
183255
| 183460