Commit graph

35 commits

Author SHA1 Message Date
2482819de9 Bug 9252 - Add option to send patron's home branch in AF field - QA Followup
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 06:08:07 +00:00
e1de36fbb9 Bug 9252 - Add option to send patron's home branch in AF field
This patch gives you the option of sending a patrons home branch code
in an AF field for patron status requests. It is controlled at the account
login level, so it can be enable on a per-sip-login basis.

Test Plan:
1) Apply patch
2) Edit SIPconfig.xml, add the parameter 'send_patron_home_library_in_af="1"'
   to the login you will be using to test.
3) Start your SIP2 server.
4) Connect to it via telnet ( something like: '9300CNterm1|COterm1|CPCPL|' )
5) Send a patron status request ( like: '2300120121110    82925AOCPL|AA23529000035676|ACterm1|ADletmein' )
6) Examine reponse you should see something like this:
      "24              00120121210    085332AEHenry Acevedo|AA23529000035676|BLY|CQN|AFGreetings from Koha. |AFMPL|AO|"
   Note the second AF field with the value MPL.

Signed-off-by: George Williams <georgew@latahlibrary.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 06:07:38 +00:00
90e2aafeb5 Bug 9531: Make SIP2 message terminator configurable via SIPconfig.xml
Add a terminator option to SIPConfig.xml, choices for 'terminator' are
'CR' or 'CRLF'.  The default continues to be 'CRLF' if 'terminator' is
undefined.

Test Plan:
1) Apply patch
2) Start SIP server
3) Run C4/SIP/t/04patron_status.t
4) Stop SIP server
5) Add terminator="CR" for account login 'term1'
6) Run 04patron_status.t again, you should see no change

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Adrien Saurat <adrien.saurat@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 05:44:09 +00:00
Colin Campbell
7e7b3731dc Bug 8433 Remove unused 'use English'
Adding a use English to mosules which dont may
waste a few CPU cycles and bytes of storage
but doesnt add anything to the sum of human happiness

Remove unnecessary use English's
Removed already commented out but equally unnrcessary
use Exporter in same modules

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-13 08:42:50 -05:00
Colin Campbell
c5d1d9b623 Bug 8336 Support Sip Renewal Transaction
Renewals were being rejected for incorrect reasons
Checking was being done against the wrong object
Add more informative messages on failure
Correctly set due_date for renewal response
Avoid crashing the SIPServer because it handles RenewAll
incorrectly

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-18 11:22:03 +02:00
Marc Balmer
078ce11e11 Bug 7787: Make the SIP server much more robust.
Be liberal in what we accept, but strict in what we send:
Never exit the server process, but send a SC_RESEND message (96)
to the client if we received anything we don't understand.
 This is consistent with SIP server implementations of other ILSs.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-06 15:37:37 +02:00
Colin Campbell
9929c52a57 Bug 8216: Allow SIP modules to pass critic tests
Add C4/SIP to perlcritic tests. Fix those issues that were
generating perlcritic errors

Signed-off-by: Stacey Walker <stacey@catalyst-eu.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 11:14:00 +02:00
Chris Cormack
509d673f10 Bug 7941 : Fix version numbers in modules
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 17:29:38 +02:00
Colin Campbell
dbd2713ff0 Bug 3638 : Captured Holds may need to generate a transfer
If a discharged item is captured for a hold at another branch
the selfcheck should generate a branchtransfer for it.
This was complicated as the checkin routine was setting its own
location from a field not set in many scm machines (e.g. 3M)
also in ILS::Transaction the test for location was incorrect
assuming that an empty string or undefined was a valid location

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-05 16:11:18 +02:00
Colin Campbell
0006fed162 Bug 3638 Self Check Should Capture Hold Items
Shelf Check was receiving messages saying item was wanted
for a hold but the item was discharged to the shelf
not associated with the hold or transited to
the pickup location. The message was also being sent
on discharge of items when a suitable item had already
been captured.
Checkin now associates the item with the hold and sets
the appropriate data for a correct checkin response

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2012-06-05 16:11:17 +02:00
Colin Campbell
78938e685c Bug 6335 Set branch in sip session
The server returns its branch as the institution in the config file
However in transactions it will default to the homebranch of the
sip user which may not be consistent with that. Needs to set branch
in the session if there is a value in config otherwise statistics and
behaviour can be wrong (esp in discharge)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-11 11:15:06 +02:00
Colin Campbell
6c0962f06b Bug 5605 [ENH] SIP: Add Support for the Fee Paid Message
Allow fee paid to be supported for those machines which handle it

Development Sponsered by Halton Borough Council

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-07 08:56:15 +12:00
Ulrich Kleiber
8a7c916766 Bug 6765: sip2 unicode checksum
Changes checksum calculation method, as per Dan Scott's fix in openncip.
see http://sourceforge.net/tracker/?func=detail&aid=2925760&group_id=161781&atid=821216

http://bugs.koha-community.org/show_bug.cgi?id=6765
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-27 19:38:32 +12:00
Colin Campbell
e793b0dda6 Bug 6311 check_inst_id was being passed non-existent value
Due to a typo in the hash key check_inst_id in the
handle_end_patron_session was always logging an error
as the actual field contents were not being checked
unlike in other messages

Signed-off-by: Frederic Demains <frederic@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-01 15:17:12 +12:00
Colin Campbell
d4842d4560 Bug 5601 Fix processing of DueDate return
item duedate is not a datetime entity but a string retrieved
direct from the db that only needs restructuring
checkout was doing so but item_info was pretending it was in secs
(actually Item.pm manipulated then overwrote it!!)
assume the date in the db is correct (otherwise madness ensues)
dont try to second guess it
As duedates do not yet include a time element assume end of day
as a safety first

[F. Demians] I confirm Joe Atzberger diagnostic. That's a bug reported by a
library. I've tested Colin Campell solution. It fixes the bug.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-12 19:30:25 +13:00
Colin Campbell
f4b3c131dc Bug 3723 Correct return of Institution in Patron Info Resp
While the comment correctly notes that the order of variable length
fields is not fixed some units expect mandatory fields to
follow the sequence in the protocol definition and fail
parsing otherwise. Moved institution id to its expected
place in the patron information response.

Indented the first half of the if (patron_valid) so its clearer
that two cases are handled here.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 21:22:29 -05:00
Colin Campbell
52c3a85320 Bug 4088 Due Date Not formated in checkout response
due date was not being formatted as a timestamp
but being passed as epoch seconds

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-02 18:46:01 -05:00
9d1a31c7f6 Bug 3813: SIP2, Bad Patron Information Response to Message 64
This fix returns item's barcodes in AU fields
2010-01-28 15:14:52 +01:00
Colin Campbell
c4d833148d Return barcode as Sip hold_patron_id
Behave consistently with other patron_ids as many sip clients
use this in a subsequent patron information or patron status request

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-06 09:01:27 -04:00
Joe Atzberger
d24d147831 bug 3435: SIP2 - 3M extension for SmartChute checkin.
Implement the optional fields: CR CS CT CV CY and DA.
Also silenced some outstanding debugging print statements.
Consolidated similar accesseor subs in Patron.pm to use x_items.
Adjust SIP tests to specify correct AP (location).  Add a 3rd item
to SIPtext.pm for later use.

Note CT (destination) is currently populated with destination branch code.
We can adjust that to be destination branch name, or some combination in
a subsequent patch if necessary.

This work was sponsored by the Northeast Kansas Library system.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:06:53 -04:00
Joe Atzberger
08816bab07 bug 3435: SIP Checkin extension for 3M SmartChute - partial
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:06:47 -04:00
Joe Atzberger
21725c3a2c 3M SIP2 Extensions groundwork and Patron Info popoulation
This includes some initial work for the 3M SIP2 extensions.
It also better populates the Patron object with methods for
a fuller Patron Information Reponse.  This is positively affect
EnvisionWare software, as used by NEKLS.

This work was sponsored by the Northeast Kansas Library System.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 10:14:49 -04:00
Joe Atzberger
49bf046701 Prevent compilation errors from complex C4 import/export.
SIP code uses UNIVERSAL modules that do not tolerate the circular deps in
C4, specifically, in Auth.pm.  Changing the order so that UNIVERSAL follows
the other imports is important to avoiding failures like:
  perl -w -e 'use UNIVERSAL qw(can); use C4::Auth;'
    "MarkIssueReturned" is not exported by the C4::Circulation module

This patch should resolve the problem earlier seen with Shelves too.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-18 07:15:39 -05:00
Andrew Moore
dde4051f1b Bug 2400 [18/18]: fixing pod syntax in C4/SIP/Sip/MsgType.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-12 19:43:24 -05:00
Joe Atzberger (siptest
3e7013d174 Bugfix Circulation, Expand ILS::Patron mapping.
ILS::Patron is where most of the intelligence for SIP's representation
is lodged.  Currently there is difficulty with C4::Members functions.
GetMemberDetails is required for the needed flags, but it returns
empty structure on bad barcodes, where it should be undef.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:45:29 -05:00
Joe Atzberger (siptest
5aecb46ad0 SIP - Lots of regexp hacking of input streams and verbose debugging feedback.
The basic problem is that the SIP logic doesn't know where the
input is coming from.  It might be a RAW socket, and it might
be telnet.  If it is telnet, although the specs declare a
character set (from MS, unfortunately), they do not specify a telnet
implementation.  So you might get telnet handshaking or
renegotiations in the middle of an otherwise peaceful session and
these should not be taken as SIP commands.  Patches include a move
towards using $CRLF from Socket to avoid problems w/ foreign platform
mapping \n and \r to \015 or \012.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 06:12:42 -05:00
Joe Atzberger (siptest
5f9a539104 Major SIP components reworked.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:43:43 -05:00
Joe Atzberger (siptest
5671608e13 Object oriented module is not an Exporter.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:43:40 -05:00
Joe Atzberger (siptest
53576bbb19 Tweak verify_cksum.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:43:37 -05:00
Joe Atzberger (siptest
2cc75039d8 Object oriented module is not an Exporter. 2 subs added, also.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:43:31 -05:00
Joe Atzberger (siptest
926e6135e5 Object Oriented module is not an Exporter.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:43:28 -05:00
Joe Atzberger (siptest
1d821fe51a Whitespace cleanup and one commented-out function added.
Verify with: git diff -w  C4/SIP/Sip/Configuration.pm

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:43:26 -05:00
Chris Cormack
cc67a70f10 Work in progress on the SIP code
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-06 06:33:04 -06:00
Ryan Higgins
cca508bbed updating ILS::Patron for Koha.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-06 06:32:55 -06:00
Ryan Higgins
7b9b36bd2e adding openncip / opensip SIP2 service
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-06 06:32:53 -06:00