[Koha] Re: Inventory & items.itemcallnumber
Matthew Metzger
news at metzger.cc
Tue Jul 10 08:15:49 NZST 2007
Joshua M. Ferraro wrote:
> Hiya Matthew,
>
> See answers below :-)
>
> ----- "Matthew Metzger" <news at metzger.cc> wrote:
>> My problem is that our librarian cannot currently do inventory because
>> we have not been entering in a value for items.itemcallnumber (which I
>> believe to be MARC 082b).
>>
>> Our call number is, however, recorded in the database field
>> biblioitems.classification. What seems to be the solution is for the
>> value of biblioitems.classification to be copied to, or synced with, the
>> value of items.itemcallnumber.
>>
>> I'm sure that if I knew SQL decently that I could invoke some command to
>> do just that. I don't know SQL. Could anyone give me a way to copy
>> biblioitems.classification to items.itemcallnumber?
>>
>> I'm assuming that this syncing of fields would solve my problem and that
>> then our librarian could begin working on inventory.
> OK, so there are few steps here:
>
> 1. run some SQL to copy the contents of biblioitems.classification
> into items.itemcallnumber
>
> Here's a script I whipped up that should take care of that issue:
>
> http://kados.org/stuff/update_itemcallnum.pl
>
> NOTE: I haven't tested this script, if it destroys your database
> or pilfers your wife's jewelry, don't blame me ;-) Seriously, I'd
> recommend trying this out on a test database first to make sure
> it works.
>
> When you've got that test db set up, you should be able to run:
>
> $ wget http://kados.org/stuff/update_itemcallnum.pl
> $ export KOHA_CONF=/path/to/koha.conf (the test db one)
> $ perl -I /path/to/koha update_itemcallnumber.pl
>
> 2. map items.itemcallnumber, set it up as an items field, and write
> a plugin to populate it automatically to save your cataloger the
> grief of having to copy/paste it from the biblio level.
>
> This one is slightly trickier, because I haven't written the plugin
> yet ;-). I'll see if I have some time later today. If I don't
> get back to you in a day or two be sure to ping me ;-)
>
> 3. I'd recommend looking at the newer versions of the inventory
> scripts in CVS, I know Ryan's patched them up lately and they
> (I think) have some better handling of the callnumber strings
> and more functions ...
>
> Hope that helps.
>
> Cheers,
>
First, thanks Joshua for the script. It seemed to work perfectly.
I completed steps 1 and 3 from the directions you gave me. I am not sure
how to map items.itemcallnumber and Ryan said that he might commit a
plugin that would do just this, so I'd thought I'd wait on that.
I had assumed that once items.itemcallnumber had values, that I'd be
able to get some type of result from the inventory.pl script. However, I
still got nothing. I am also not able to get a result from the "Not seen
since:" field. I thought that this would not depend at all on
items.itemcallnumber so it might work. As it stands, I'm not able to get
any result from any entry field using inventory.pl. Is this normal
behavior for 2.2.9?
thanks all for your time and your help.
-Matthew
More information about the Koha
mailing list