[Koha-bugs] [Bug 11399] batch Rebuild Items Tables

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 23 03:02:48 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11399

Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23593|0                           |1
        is obsolete|                            |

--- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> ---
Created attachment 29156
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29156&action=edit
[SIGNED-OFF] Bug 11399: batch Rebuild Items Tables

You can/must use it when you change items mapping.
this script rebuilds the non-MARC DB items table from the MARC values

usage : batchRebuildItemsTables.pl [ -h ][ -c ][ -t ][ -where ]

Options:
   -h --help       (or without arguments) shows this help message
   -c              Confirm: rebuild non marc DB (may be long)
   -t              test only, change nothing in DB
   --where         add where condition on default query
                   (eg. -where 'biblio.biblionumber<100')

(copied test plan)
to test it :

create a test item (eg on biblionumber 3) with a non mapped subfield with a
test value.
check real items DB row ( SELECT * from items where biblionumber=3 ) => non
mapped value is in more_subfields_xml
map the non mapped subfield with unused items column
re-check in Db that nothing changes
run ./batchRebuildItemsTables.pl -c --where 'biblio.biblionumber=3'
check real items DB row ( SELECT * from items where biblionumber=3 ) => new
mapped value is not in more_subfields_xml anymore but in the mapped column

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
Work as described, no koha-qa errors.
Add a new item to record, save with value in unmapped subfield ('x')
Change mapping, run script, value on newly mapped column

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list