Saving a new item type
I'm looking for some help please having come up against a brick wall. We defined a new "Item Type" "Files and Binders" code 'FB', made a new Framework structure, and entered a few biblios/items to verify it. Appears to work, see <http://opac.navalmarinearchive.com/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=25936> where both the 942$c and 952$y are _correctly_ showing 'Files and Binders' However, we use a script that needs $itemtype and which works perfectly for all item types _except_ this new one. So I looked into the MySQL side of things, and the new 'FB' is _not_ getting saved: mysql> SELECT itemtype from biblioitems Group by itemtype; +----------+ | itemtype | +----------+ | NULL | | AU | | BK | | CM | | CR | | HB | | VI | | VM | +----------+ 8 rows in set (0.00 sec) and mysql> SELECT ExtractValue(marcxml,'//datafield[@tag="952"]/subfield[@code>="y"]') AS itemt FROM biblioitems HAVING itemt REGEXP 'FB'; Empty set (0.59 sec) "Test MARC biblioframework" is good. All other cataloguing is fine. I must be doing something wrong or making a basic mistake that I just can't see. Help or suggestions on adding a new "itemtype" would be warmly welcomed. Thanks -- Paul
Paul A schreef op ma 20-10-2014 om 20:55 [-0400]:
mysql> SELECT itemtype from biblioitems Group by itemtype; +----------+ | itemtype | +----------+ | NULL | | AU | | BK | | CM | | CR | | HB | | VI | | VM | +----------+ 8 rows in set (0.00 sec)
This is 942$c, which is less commonly used. It doesn't apply to items.
mysql> SELECT ExtractValue(marcxml,'//datafield[@tag="952"]/subfield[@code>="y"]') AS itemt FROM biblioitems HAVING itemt REGEXP 'FB'; Empty set (0.59 sec)
This will never work, as 952 isn't stored in with the rest of the MARC record. You want to be looking at the 'items' table: http://schema.koha-community.org/tables/items.html -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
participants (2)
-
Paul A -
Robin Sheat