Waylon Robertson <waylon@...> writes:
Part of my question is what does the itemcallnumber preference setting do exactly? I've read the section in the user's guide several times and it's still not clear to me. In additem.pl it determines if and where the itemcallnumber field should be
At 06:38 a.m. 20/08/2005, Mike D. wrote: placed, and a cgi list (FIXME, a cgi scrolling list embedded into perl) displays some kid of list using results of this as a default. Relevant code follows. line 205 # search for itemcallnumber if applicable if ($tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' && C4::Context->preference('itemcallnumber')) { my $CNtag = substr(C4::Context->preference('itemcallnumber'),0,3); my $CNsubfield = substr(C4::Context->preference('itemcallnumber'),3,1); my $temp = $record->field($CNtag); if ($temp) { $value = $temp->subfield($CNsubfield); } } then from line 245: $subfield_data{marc_value}= CGI::scrolling_list(-name=>'field_value',
-values=>
\ <at> authorised_values,
-default=>"$value",
-labels => \%authorised_lib, -size=>1, -multiple=>0, );
Is it supposed to give you a default call number from another MARC field? Say I have item.itemcallnumber linked to 952c now if I set the itemcallnumber preference to 050a should it copy the contents of 050a to 952c as a default call number to edit when adding an item? From C:\usr\koha200pre2\scripts\updater\updatedatabase... (818): variable => 'itemcallnumber', (822): explanation => 'The MARC field/subfield that is used to calculate the itemcallnumber (in UNIMARC : 676a for Dewey, 680a for Loc)', (1341): $dbh->prepare("ALTER TABLE `items` CHANGE `bulk` `itemcallnumber` VARCHAR( 30 ) DEFAULT NULL"); (1343): $sti = $dbh->prepare("update marc_subfield_structure set kohafield=\"items.itemcallnumber\" where kohafield=\"items.bulk\""); (1532):# adding itemcallnumber entry
OR Is it used to tell the opac what the callnumber field is? So instead of displaying/searching a call number using biblioitems.classification it uses 952c? This seems somewhat circular to me so I'm think it's the other one.
I think I might be visiting an old topic here but I didn't see any solution to the thread in the archives. Regarding the thread "opac call number display different in normal & marc views" from 2005-05-15, I am experiencing the same issue where item level call numbers show in MARC view but not normal view. I know VERY little about perl but I managed to figure out that if I change /usr/local/koha/opac/htdocs/opac-tmpl/npl/en/opac-detail.tmpl at line 95 from <td><!-- TMPL_VAR NAME="classification" --></td> to <td><!-- TMPL_VAR NAME="itemcallnumber" --></td> it will display the proper item level call number.
Is this a really crude hack and am I likely to break something? I've noticed several other areas of the NPL intranet interface where the Call Number is inconsistent. Sometimes it uses biblioitems.classification and others it uses item.itemnumber. Can these screens be fixed in a similar manner? Is there a better way?
Thanks for your time, Mike
_______________________________________________ Koha mailing list Koha@... http://lists.katipo.co.nz/mailman/listinfo/koha
-- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.12/77 - Release Date: 18/08/2005
Thank you both Waylon and Thomas for your replies. Unfortunately I feel I'm almost able to grasp it but just not quite. Sorry if I confuse some terminology like tags and fields but it's due to being a MARC newbie (a PERL newbie as well). From the first code section I believe it's parsing the itemcallnumber preference setting for a MARC tag/subfield, the contents are then assigned to $value. $value is then used to provide a default value for the call number field when adding an item. But this seems to contradict the following sentence in the Users's Guide Ch1: "If you choose to use item call numbers -- ... -- then you must use this preference to tell Koha which subfield in your MARC holding tag contains the entire call number." Following that would lead me to believe the itemcallnumber preference should be set to the same field that item.itemcallnumber is mapped to. (See what I mean by circular?) Ok, I think I may have just grasped the concept. The above excerpt only applies to migrating to Koha and the old system contains the entire call number in some other tag? I'm setting up a completely new system using MARC21 and LOC classification/call numbers. So my call numbers are based on 050a and 050b. Looking at the code it doesn't look like I can specify more than one subfield so my best bet is to use 050a for the itemcallnumber preference? Thomas, when you say "Map 852 $k, 050 $a, 050 $b, and 852 $m concatenated together sequentially to 952 $h for items.itemcallnumber" you are talking about manipulating the MARC records externally to Koha right? I think most of your document is targeted at people migrating to Koha correct? But the "KOHA TEMPLATE CALL NUMBER USE" section did help me. This means I should be able to change the templates in the manner I did below, correct? Thanks, Mike _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
participants (1)
-
Mike D.