Koha Test Wiki MW Canasta on Koha Portainer

Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Holdings data fields (9xx)

From Koha Test Wiki MW Canasta on Koha Portainer
Jump to navigation Jump to search

Holdings data - The theory

Koha inserts holdings data in two places:

  • The MARC data, in a specific field. You can use only one marc field for holdings
  • In the sql table called 'items'. You can use only this table for holdings

The connection between the marc field and the sql tables 'items' is done with the frameworks. You can't change the sql table 'items' but YOU can change the marc field and subfields with the web interface. In fact you can operate on the table 'items' and on its fields, but you need to operate with SQL directly on Koha DB. And any change at this level could be dangerous.

You can check the connection between marc field and sql table with "Koha to MARC mapping" in Koha Administration section

So, technical speaking, you can use every marc field that you want to insert holding data. But it easier to maintain the defaults setup. In this wiki page we describe the standard setup for english language. Others language could use different setups.

Koha does not use MARC21 field 852 directly and many proprietary systems seem to use 852 slightly differently so you need to check it anyway.

Holdings data - How to insert dates

Date formats in the specific subfields are required to be in the system internal format for data loading and subsequent item editing.

The format is: YYYY-MM-DD

Note also that dates formats for display are controlled by the system preferences (Administration › Global system preferences › 118N/L10N › dateformat). Four display date formats are available:

  • United States: mm/dd/yyyy
  • Metric: dd/mm/yyyy
  • Metric: dd.mm.yyyy
  • ISO 8601: yyyy-mm-dd

MARC21 Holding field (952)

Notes

  • For 3.0.x and 3.2.x: Holdings data is serialized and stored in repeatable 952 field. Information for each item should be introduced in a new 952 field repetition. The meaning of the subfields, and mandatory subfields is described in the following table.
  • For 3.4.x+: Holdings data is no longer stored in a 952 field of MySQL database and that information is introduced in the items table only. Even when holdings data is no longer stored in 952 field of marcxml/marc fields in the database, bulkmarcimport.pl script still reads holdings information from that fields.
Tag/subfield Data element SQL column Description Notes
952$0 Withdrawn status items.withdrawn Status of the item, connect with the authorized values list 'WITHDRAWN' The defaults values of the list are: 0 = "" [Not withdrawn]; 1 = 'Withdrawn'
952$1 Lost status items.itemlost Status of the item, connect with the authorized values list 'LOST' The defaults values of the list are: 0 = "" [Not Lost]; 1 = 'Lost'; 2= 'Long Overdue (Lost)'; 3 = 'Lost and Paid For'; 4 = 'Missing'
952$2 Source of classification or shelving scheme items.cn_source Classification scheme that defines filing rules used for sorting call numbers. If no classification scheme is entered, the system will use the value entered in the Cataloging preference "DefaultClassificationSource".
952$3 Materials specified (bound volume or other part) items.materials Specific issues of serials or multi-part items. Copy/volume data is stored in 952$h and $t for display in normal views. $3 is by default only displayed in the staff interface, but can be made visible in the OPAC using column configuration settings (Bug 13547). The materials note will also display on checkout and checkin.
952$4 Damaged status items.damaged Status of the item, connect with the authorized values list 'DAMAGED' The defaults values of the list are: 0 = "" [Not damaged]; 1 = 'Damaged'
952$5 Use restrictions items.restricted Status of the item, connect with the authorized values list 'RESTRICTED' The defaults values of the list are: 0 = "" [Not restricted]; 1 = 'Restricted'
952$6 Koha normalized classification for sorting items.cn_sort
952$7 Not for loan items.notforloan Status of the item, connect with the authorized values list 'NOT_LOAN' The defaults values of the list are: -1 = Ordered; 0 = "" [Available for loans]; 1 = Not for Loan; 2 = Staff Collection
952$8 Collection code items.ccode Status of the item, connect with the authorized values list 'CCODE' The collection code provides another means for breaking down the library collection into categories (Example: Fiction, Mysteries, etc.) for reports. It is also used for cataloging and circulation statistics.
952$9 Koha itemnumber (autogenerated) items.itemnumber System-generated item number. Does not display in the item record
952$a branchcode
items.homebranch owning library Code must be defined in System Administration → Libraries, Branches and Groups
952$b branchcode
items.holdingbranch holding library (usu. the same as 952$a ) Same note of previous subfield
952$c Shelving location code items.location Coded value, matching the authorized value list 'LOC'
952$d Date acquired items.dateaccessioned YYYY-MM-DD The date the item was purchased or acquired.
952$e Source of acquisition items.booksellerid coded value or vendor string Name or abbreviation of the publisher, distributor, or vendor. This may also be the vendor code from the acquisitions module, but there is little functionality currently that uses this field.
952$f Coded location qualifier items.coded_location_qualifier Three-character code that identifies the specific issues of the item that are located apart from the main holdings of the same item. This has no function in Koha.
952$g Purchase price items.price Original purchase price or list price decimal number, no currency symbol
952$h Serial enumeration caption items.enumchron Volume and issue information for serial items.
952$i Inventory number items.stocknumber The inventory number. It is not repeatable and not mandatory. Added with 3.4.0
952$j Shelving control number items.stack The stack number of the item, inventory code.
952$l Total Checkouts items.issues Total number of checkouts. Display only field.
952$m Total Renewals items.renewals Total number of renewals. Display only field. This is the cumulative total. The total number of renewals is not reset to 0 when the item is checked in.
952$n Total Holds items.reserves Total number of holds. Display only field..
952$o Koha full call number items.itemcallnumber
952$p * barcode items.barcode max 20 characters
952$q Due date items.onloan Due date of checked out item. YYYY-MM-DD. When the item needs to return from a loan. NULL if it's not issued.
952$r Date last seen items.datelastseen The date that the item was last seen in the library (checked in / checked out / inventoried).
952$s Date last checked out items.datelastborrowed Last checkout date of item. Display only field.
952$t Copy number items.copynumber Copy number for items that have the same location and call number.
952$u Uniform Resource Identifier items.uri A URL or URN, which provides electronic access data in a standard syntax.
952$v Replacement price items.replacementprice decimal number, no currency symbol If an item is marked lost, this value is charged to the patron.
952$w Price effective from items.replacementpricedate YYYY-MM-DD This date relates to 'normal purchase price'.
952$x Non-public note items.itemnotes_nonpublic Internal staff note.
952$y * Koha item type items.itype coded value, required field for circulation Coded value, must be defined in System Administration → Item types and Circulation Codes
952$z Public note items.itemnotes
  • The subfields with an asterisk (*) are required for circulation.
  • The subfields in bold are mandatory for the standard Koha setup.
  • New subfields (by default) won't be linked directly to any column of items table. Their data will be stored on an XML on the column items.more_subfields_xml.


Here is the mapping in the form of a Perl hash:

  %map = (
       itemnumber           => '9',
       barcode              => 'p',
       dateaccessioned      => 'd',
       booksellerid         => 'e',
       homebranch           => 'a',
       price                => 'g',
       replacementprice     => 'v',
       replacementpricedate => 'w',
       datelastborrowed     => 's',
       datelastseen         => 'r',
       stack                => 'j',
       notforloan           => '7',
       damaged              => '4',
       itemlost             => '1',
       wthdrawn             => '0',
       itemcallnumber       => 'o',
       issues               => 'l',
       renewals             => 'm',
       reserves             => 'n',
       restricted           => '5',
       itemnotes            => 'z',
       holdingbranch        => 'b',
       location             => 'c',
       onloan               => 'q',
       cn_source            => '2',
       cn_sort              => '6',
       ccode                => '8',
       materials            => '3',
       uri                  => 'u',
       itype                => 'y',
       enumchron            => 'h',
       copynumber           => 't',
       stocknumber          => 'i',
   );

UNIMARC Holding field, 3.0 default - field 995

To do


UNIMARC Holding field, 3.2 default - field 995

Until now only a proposal (not in the code)

Tag/subfield
Data element
SQL column
Description
Notes
995$0
Withdrawn status
items.wthdrawn


995$2
Lost status
items.itemlost


995$3
Use restrictions
items.restricted


995$5
Date acquired
items.dateaccessioned


995$6
Copy number
items.copynumber


995$7
URI
items.uri


995$8
Koha collection
items.ccode


995$9
Internal item number
items.itemnumber


995$a
Homebranch (free text)
----


995$b
Homebranch (coded)
items.homebranch


995$c
Holding branch (coded)
items.holdingbranch


995$d
Holding branch (free text)
----


995$e
Shelving location
items.location


995$f
Barcode
items.barcode


995$j
Inventory number
items.stocknumber


995$k
Call number
items.itemcallnumber


995$l
Numbering (volume or other part)
items.materials


995$m
Date of loan or deposit
items.datelastborrowed


995$n
Expiration of loan date
items.onloan


995$o
Circulation type (not for loan)
items.notforloan


995$r
Type of item and material
items.itype


995$u
Copy note
items.itemnotes


995$v
Serial Enumeration / chronology
items.enumchron

For serials