Description
Amit Gupta
2010-11-15 10:40:07 UTC
Created attachment 2754 [details] [review] [PATCH] Bug 5409 - Fix call number not shown on opac search result page There is a conflict in the definition of the syspref. The SQL files install it as type choice with the possible values being 'statuses' and 'itemdetails'. The description is statuses : show only the status of items in result list. itemdisplay : show full location of items (branch+location+callnumber) as in staff interface However, preferences/searching.pref thinks that it's a Boolean: - pref: OPACItemsResultsDisplay type: boolean choices: yes: Show no: "Don't show" Since there are only two choices, even in the original definition of the system preference, the (what I suspect was inadvertent) redefinition of it in searching.pref needs a corresponding database update that would do the following: * change the type of the syspref to YesNo * set the syspref value to '1' if it is 'itemdetails' and 0 if it is 'statuses', leaving it alone if it is already 1 or 0. I submitted a patch for Bug 4268 which I hoped would solve the OPACItemsResultsDisplay problem. > I submitted a patch for Bug 4268 which I hoped would solve the
> OPACItemsResultsDisplay problem.
I guess my solution and Amit's were the same, and both incorrect?
This bug is mentioned in: Bug 5409 - Fix call number not shown on opac search result page http://lists.koha-community.org/pipermail/koha-patches/2010-November/013009.html Created attachment 10288 [details] [review] Attaching Patch. Fixes Bug 5409, Set the syspref value to 1 if it is itemdetails and 0 if it is statuses, leaving it alone if it is already 1 or 0 and change the type of the syspref to YesNo. I think both these patches are needed, unobsoleting one Created attachment 11049 [details] [review] [SIGNED-OFF] Bug 5409 - Fix call number not shown on opac search result page Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 11050 [details] [review] [SIGNED-OFF] Bug 5409 [2] Call number is not show on Opac search result page. [SIGNED-OFF] Bug 5409 - Call number is not show on Opac search result page. Fixes Bug 5409, Set the syspref value to 1 if it is itemdetails and 0 if it is statuses, leaving it alone if it is already 1 or 0 and change the type of the syspref to YesNo. Signed-off-by: Owen Leonard <oleonard@myacpl.org> These patches correct the problem for the "normal" view in the OPAC. It does not affect the XSLT display. QA Comments: Display the location and itemcallnumber for items if the syspref OPACItemsResultsDisplay is on. Marking as Passed QA QA comment: I think this patch is wrong because OPACItemsResultsDisplay is not updated to boolean everywhere: installer/data/mysql/sysprefs.sql still says INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACItemsResultsDisplay',"statuses",'statuses : show only the status of items in result list. itemdisplay : show full lo cation of items (branch+location+callnumber) as in staff interface',"statuses|itemdetails",'Choice'); I think other places are OK. Please provite an other follow-up & switch back to passed QA, i'll push Created attachment 12300 [details] [review] Attaching the latest patch. attached the patch. Created attachment 12425 [details] [review] [SIGNED-OFF] Bug 5409 - Fix call number not shown on opac search result page Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 12426 [details] [review] [SIGNED-OFF] Bug 5409 - Call number is not show on Opac search result page. Fixes Bug 5409, Set the syspref value to 1 if it is itemdetails and 0 if it is statuses, leaving it alone if it is already 1 or 0 and change the type of the syspref to YesNo. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 12427 [details] [review] [SIGNED-OFF] Bug 5409 - Call number is not show on Opac search result page - QA Followup Fixes Bug 5409, Modified the definition of 'OPACItemsResultsDisplay' in systempreferences and changed the code in opac-search.pl file for 'OPACItemsResultsDisplay'. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> (In reply to comment #16) > Created attachment 12427 [details] [review] > [SIGNED-OFF] Bug 5409 - Call number is not show on Opac search result page - > QA Followup > > Fixes Bug 5409, Modified the definition of 'OPACItemsResultsDisplay' in > systempreferences and changed the code in opac-search.pl file for > 'OPACItemsResultsDisplay'. > > Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> patch works as expected, passing QA on 3 patches... $ koha-qa.pl -c 3 testing 3 commit(s) (applied to commit 6c18204) * bff8bed Bug 5409 - Call number is not show on Opac search result page. installer/data/mysql/sysprefs.sql * 350b661 Bug 5409 - Call number is not show on Opac search result page. installer/data/mysql/updatedatabase.pl * e9be52e Bug 5409 - Fix call number not shown on opac search result page opac/opac-search.pl * installer/data/mysql/updatedatabase.pl OK * opac/opac-search.pl OK Patch pushed to master Was pushed to 3.10.x *** Bug 4268 has been marked as a duplicate of this bug. *** |