Since commit 091d6c513bcbee224ff06477e79be48cea7fe825 Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes
Created attachment 70551 [details] [review] Bug 19978: Fix ITEMTYPECAT behaviour ITEMTYPECAT permits to group and hide item types at the OPAC (see bug 10937 for a complete description). Since commit 091d6c513bcbee224ff06477e79be48cea7fe825 Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes the code assume that they are item types. Before it just assigned undef to the description. Test plan: Create ITEMTYPECAT authorised values Assign an item type to this authorised value group Search for a item using this item type at the OPAC Without this patch applied you get: Can't call method "translated_description" on an undefined value at /home/vagrant/kohaclone/opac/opac-search.pl line 231. With this patch applied the search result is displayed. Make sure the original feature still works.
Hiya, The patch has fixed the error message. However, in the OPAC advanced search under the Item type tab, there is a checkbox for my new ITEMTYPECAT but no description (label) is displayed. If I select only the new category checkbox to perform a search (no keywords etc), nothing happens and the advanced search page refreshes. If I check the new category and also another itype category (eg: music) with no keywords, then search results are displayed as expected.
Created attachment 71471 [details] [review] Bug 19978: Fix ITEMTYPECAT behaviour ITEMTYPECAT permits to group and hide item types at the OPAC (see bug 10937 for a complete description). Since commit 091d6c513bcbee224ff06477e79be48cea7fe825 Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes the code assume that they are item types. Before it just assigned undef to the description. Test plan: Create ITEMTYPECAT authorised values Assign an item type to this authorised value group Search for a item using this item type at the OPAC Without this patch applied you get: Can't call method "translated_description" on an undefined value at /home/vagrant/kohaclone/opac/opac-search.pl line 231. With this patch applied the search result is displayed. Make sure the original feature still works.
Retested: I have two ITEMTYPECAT categories. Only one of them is showing a description in the OPAC Adv search. The other is still an empty checkbox. :( Searching by selecting only one (or both together) of my ITEMTYPECAT checkboxes is still not working. Selecting a 'Normal' itype (not in a category) performs a search.
(In reply to Claire Gravely from comment #4) > Retested: > > I have two ITEMTYPECAT categories. Only one of them is showing a description > in the OPAC Adv search. The other is still an empty checkbox. :( I guess you forgot to fill the OPAC description field. It should pick the staff value, but I would prefer to fix that minor bug somewhere else. > Searching by selecting only one (or both together) of my ITEMTYPECAT > checkboxes is still not working. Selecting a 'Normal' itype (not in a > category) performs a search. This sounds like it was a bug since the beginning. Fixed.
(In reply to Jonathan Druart from comment #5) > (In reply to Claire Gravely from comment #4) > > Retested: > > > > I have two ITEMTYPECAT categories. Only one of them is showing a description > > in the OPAC Adv search. The other is still an empty checkbox. :( > > I guess you forgot to fill the OPAC description field. It should pick the > staff value, but I would prefer to fix that minor bug somewhere else. You are right, I had only added an OPAC description for one of the categories. > > > Searching by selecting only one (or both together) of my ITEMTYPECAT > > checkboxes is still not working. Selecting a 'Normal' itype (not in a > > category) performs a search. > > This sounds like it was a bug since the beginning. Fixed. When 'More options' are displayed in the adv. search the categories work correctly. It is still broken if 'More Options' hasn't been selected.
Claire, I do not recreate. I am not willing to fix all the issues this feature has (from when it has been written) anyway :) The goal here is to fix regressions with previous versions.
(In reply to Jonathan Druart from comment #7) > Claire, I do not recreate. > I am not willing to fix all the issues this feature has (from when it has > been written) anyway :) > The goal here is to fix regressions with previous versions. OK I'll sign off as is and see if there is a bug report for the other issue.
Created attachment 71539 [details] [review] Bug 19978: Fix ITEMTYPECAT behaviour ITEMTYPECAT permits to group and hide item types at the OPAC (see bug 10937 for a complete description). Since commit 091d6c513bcbee224ff06477e79be48cea7fe825 Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes the code assume that they are item types. Before it just assigned undef to the description. Test plan: Create ITEMTYPECAT authorised values Assign an item type to this authorised value group Search for a item using this item type at the OPAC Without this patch applied you get: Can't call method "translated_description" on an undefined value at /home/vagrant/kohaclone/opac/opac-search.pl line 231. With this patch applied the search result is displayed. Make sure the original feature still works. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Created attachment 71901 [details] [review] Bug 19978: Fix ITEMTYPECAT behaviour ITEMTYPECAT permits to group and hide item types at the OPAC (see bug 10937 for a complete description). Since commit 091d6c513bcbee224ff06477e79be48cea7fe825 Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes the code assume that they are item types. Before it just assigned undef to the description. Test plan: Create ITEMTYPECAT authorised values Assign an item type to this authorised value group Search for a item using this item type at the OPAC Without this patch applied you get: Can't call method "translated_description" on an undefined value at /home/vagrant/kohaclone/opac/opac-search.pl line 231. With this patch applied the search result is displayed. Make sure the original feature still works. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all! Pushed to stable for 17.11.03