[OPEN-ILS-DOCUMENTATION] ***SPAM*** A Fix for a Problem editing Patron Data, No Barcode
Steve Wills
steve.wills at lyrasis.org
Thu Apr 1 14:01:10 EDT 2010
After a data migration project of existing patron data into
Evergreen we ran into a problem where some of the patrons could
not be edited. Upon examination, it turns out that some of our
patrons did not have barcodes. The following code, largely
supplied by John Craig at Alpha-G with a tweak from Steve Wills at
LYRASIS, yields a way of assigning temporary barcodes to these
patrons.
The SQL code:
select u.id
into migration.no_barcode_usr
from actor.usr u
except
select usr
from actor.card
;
begin
;
insert into actor.card
( usr, barcode, active )
select id, 'NC' || id, false
from migration.no_barcode_usr
;
update actor.usr
as "u"
set card = cd.id
from actor.card cd
where cd.barcode like 'NC%'
and cd.usr = u.id
;
commit;
Once the temporary bar codes are in place, the patron records can
be edited including changing the barcodes. In the staff client, a
Librarian can search for the patron by name. Select Retrieve the
patron and select edit. Using the User Identification form, the
staff member can then edit the patrons information, select Finish,
and save the user. A window with "Patron has been Updated" should
pop-up and the Patron can then have their items checked out
normally.
Here is hoping that no one ever needs this information.
Stev3 Wills
Open Source Consultant
LYRASIS
More information about the OPEN-ILS-DOCUMENTATION
mailing list