Bug 15093: Load/show saved item type group and hideinopac
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fri, 30 Oct 2015 19:25:15 +0000 (16:25 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Sun, 1 Nov 2015 20:10:44 +0000 (17:10 -0300)
This patch adds loading of hideinopac and searchgroup
when showing/editing itemtypes

To test:
1) Put some values in ITEMTYPCAT auth value
2) Edit an item type, select a value for
search category & check 'Hide in OPAC'
Save
3) Results do no show on list of item types
4) Edit same item type, values are default/empty
5) Apply the patch
6) Edit again, change again, save
Now values shows in list
7) Edit again, values are now correct

Values were saved on db, but not loaded from it
How this happen?

Side note: searching for searchcategory I found

installer/data/mysql/kohastructure.sql:  searchcategory varchar(80) default NULL, -- Group this item type with others w
installer/data/mysql/updatedatabase.pl:            ADD searchcategory VARCHAR(20) DEFAULT NULL

Its varchar(80) in kohastructure and varchar(20) in updatedatabase

We need more eyes :)

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Koha.pm
admin/itemtypes.pl

index 0a90bb3..7476106 100644 (file)
@@ -263,6 +263,8 @@ sub GetItemTypes {
                itemtypes.checkinmsg,
                itemtypes.checkinmsgtype,
                itemtypes.sip_media_type,
+               itemtypes.hideinopac,
+               itemtypes.searchcategory,
                COALESCE( localization.translation, itemtypes.description ) AS translated_description
         FROM   itemtypes
         LEFT JOIN localization ON itemtypes.itemtype = localization.code
index 2af82a3..9e2fdfe 100755 (executable)
@@ -99,6 +99,8 @@ if ( $op eq 'add_form' ) {
                    itemtypes.checkinmsg,
                    itemtypes.checkinmsgtype,
                    itemtypes.sip_media_type,
+                   itemtypes.hideinopac,
+                   itemtypes.searchcategory,
                    COALESCE( localization.translation, itemtypes.description ) AS translated_description
             FROM   itemtypes
             LEFT JOIN localization ON itemtypes.itemtype = localization.code