https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42769

--- Comment #5 from Kyle M Hall (khall) <[email protected]> ---
Created attachment 202837
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202837&action=edit
Bug 42769: Add SIP2 message testing tool to the staff interface

This patch adds a "Test SIP2 messages" tool to the SIP2 account editor in
the staff interface. Right now there is no way to check what a SIP account
will return for a given message without standing up a real SIP connection
and knowing the account's SIP password. That makes it hard to confirm the
custom template fields configured on an account ( the AE personal name,
the custom patron/item fields, and so on ) actually render the values you
expect.

The tool is reachable from a saved account: open an account and click the
new "Test SIP2 messages" button in the toolbar. You pick a message type
( patron status, patron information, item information, checkout or
check-in ), fill in a patron barcode, item barcode and/or patron password,
and the raw outgoing SIP request is built for you and shown in an editable
box that updates as you change the form. You can also edit the raw request
by hand. Running the test calls the new REST endpoint, which builds the
account's server context ( without authenticating ) and hands the request
to the real SIP message handlers. The whole thing runs in a transaction
that is always rolled back, so even a checkout or check-in leaves the
database untouched. The response is shown raw and broken down field by
field with each field's name.

The SIP field code to name map is moved out of the account editor into a
shared composable so both the editor and the tester use it.

Test Plan:
1) Apply this patch
2) yarn js:build
3) Restart all the things!
4) Go to Administration -> SIP2 -> Accounts and open an account whose
   institution implementation is "ILS"
5) Note the new "Test SIP2 messages" button in the toolbar, click it
6) Leave the message type on "Patron information", enter a valid patron
   barcode, note the raw request box updates as you type!
7) Click "Run test", note you get a response back broken down field by
   field, with the patron's name in the AE field and your custom patron
   fields rendered!
8) Switch the message type to "Item information", enter an item barcode,
   run the test, note the item fields come back!
9) Edit the raw request by hand, note the form fields stop updating it and
   a "Reset to the generated request" link appears!
10) Try "Checkout" and "Check-in" against a patron and item, note you get
    a response but the item is *not* actually checked out or in!

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to