Bugzilla – Attachment 6920 Details for
Bug 6536
Z3950 Search Enhancements: SRU targets and additional XSLT processing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] 6536: Z3950 Enhancements (DB Revision)
SIGNED-OFF-6536-Z3950-Enhancements-DB-Revision.patch (text/plain), 5.54 KB, created by
Katrin Fischer
on 2011-12-22 05:40:06 UTC
(
hide
)
Description:
[SIGNED-OFF] 6536: Z3950 Enhancements (DB Revision)
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-12-22 05:40:06 UTC
Size:
5.54 KB
patch
obsolete
>From cb58a916b4b64020c34a6336953d24a937fd31a4 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 30 Jun 2011 09:34:23 +0200 >Subject: [PATCH] [SIGNED-OFF] 6536: Z3950 Enhancements (DB Revision) > >This patch contains db revision for Z3950 enhancements: SRU search targets, MARC conversion and additional XSLT processing. > >August 11, 2011: Rebased. Removed changes for different XXX handling (see Bugzilla 6700). >December 21, 2011: Rebased. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Followed test plan on the wiki: >http://wiki.koha-community.org/wiki/Z3950_RFC > >1) Patches apply. > >2) Database update was stuck in an endless loop. >I removed the comment from the dbversion update in >updatedatabase.pl to make it work. I have not added >this change to the patch, leaving it for RM. > >3) + 12) I added the SRU configuration suggested. >Newly added fields save, can be edited and deleted. > >Note: Information about SRU configuration should be added to the >help file of this page. > >Note: XSLT and sru field information don't show on administration >page. Perhaps heading should be changed here to Z39.50/SRU? > >4) Successfully performed searches in cataloguing >- result list looks ok >- marc and isbd preview work >- import works > >5) Successfully performed searches in acquisitions >see above > >6) + 8) Searched a UNIMARC target from a MARC21 installation >- result list looks ok >- marc and isbd preview work >- import works, field mapping looks ok > >Note: isbd view has a little display problem with non filing characters > >7) Should be tested by a UNIMARC user > >8) Custom XSLT transformation >Works great with the example provided. >I saved it as MARC21toFunny.xsl into the xslt folder and used a relative url. >Result list, previews and imported records show the changes. > >Note: An option to edit the xsl file online or to upload it here >and in other instances would be a nice improvement. > >9) Searched 3 targets at once >SWB: Z39.50, MARC21 + custom XSLT >ABES: Z39.50, UNIMARC >Rijksmuseum: SRU >Got a mixed result list, result list and previews are all ok. > >X) Confirmed z39.50 search still works >Tried different searches in cataloging and acquisition >to confirm there is no regression. > >All tests passed. > >I think we need a bit more documentation inside of Koha to make >it easier for people to use the new features, but everything I tested >works nicely. >--- > installer/data/mysql/kohastructure.sql | 10 ++++++---- > installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ > 2 files changed, 18 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index a03bd23..c1e7e5d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2007,21 +2007,23 @@ CREATE TABLE `virtualshelfcontents` ( -- information about the titles in a list > > DROP TABLE IF EXISTS `z3950servers`; > CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets used in cataloging >- `host` varchar(255) default NULL, -- target's host name >+ `host` varchar(255) NOT NULL, -- target's host name > `port` int(11) default NULL, -- port number used to connect to target > `db` varchar(255) default NULL, -- target's database name > `userid` varchar(255) default NULL, -- username needed to log in to target > `password` varchar(255) default NULL, -- password needed to log in to target >- `name` mediumtext, -- name given to the target by the library >+ `name` mediumtext NOT NULL, -- name given to the target by the library > `id` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha > `checked` smallint(6) default NULL, -- whether this target is checked by default (1 for yes, 0 for no) > `rank` int(11) default NULL, -- where this target appears in the list of targets >- `syntax` varchar(80) default NULL, -- marc format provided by this target >+ `syntax` varchar(80) NOT NULL, -- marc format provided by this target > `icon` text, -- unused in Koha > `position` enum('primary','secondary','') NOT NULL default 'primary', > `type` enum('zed','opensearch') NOT NULL default 'zed', >- `encoding` text default NULL, -- characters encoding provided by this target >+ `encoding` text NOT NULL, -- characters encoding provided by this target > `description` text NOT NULL, -- unused in Koha >+ `srufields` text, -- list for matching Koha search fields with sru indexes >+ `add_xslt` varchar(255), -- name of optional xslt transformation to apply > PRIMARY KEY (`id`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 0063a75..6f8f671 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4578,6 +4578,18 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.06.XX.XXX"; #FIXME >+if(C4::Context->preference("Version") lt TransformToNum($DBversion)) { >+ $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `host` varchar(255) NOT NULL;"); >+ $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `name` mediumtext NOT NULL;"); >+ $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `syntax` varchar(80) NOT NULL;"); >+ $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `encoding` text NOT NULL;"); >+ $dbh->do("ALTER TABLE z3950servers ADD COLUMN `srufields` text;"); >+ $dbh->do("ALTER TABLE z3950servers ADD COLUMN `add_xslt` varchar(255);"); >+ print "Upgrade to $DBversion done (Bug 6536: Z3950 enhancements)\n"; >+ #SetVersion ($DBversion); #FIXME >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6536
:
4540
|
4541
|
4959
|
6901
|
6919
|
6920
|
6924
|
13462
|
26169
|
26170
|
26171
|
26172
|
29754
|
29755
|
29756
|
29779
|
29780
|
29788
|
29790
|
29791
|
29812
|
29813
|
29814
|
29815
|
29816
|
29817
|
29818
|
29819
|
30189
|
30190
|
30191
|
30192
|
30193
|
30194
|
30900
|
30901
|
30902
|
30903
|
30904
|
30905
|
30906
|
30907
|
30929
|
30930
|
30931
|
30932
|
30933
|
30934
|
30935
|
30936
|
31046
|
31048
|
31137
|
31193
|
31194
|
31195
|
31227
|
31247
|
31248
|
37264