---- Reported by magnus@enger.priv.no 2010-02-25 14:45:52 ---- [14:52] magnus: i have a problem with OPACItemsResultsDisplay - it doesn't do anything! The options are "Show/Don't show an item's branch, location and call number in OPAC search results." but when i check in mysql it says "options: statuses|itemdetails". The syspref toggels value between 1 and empty, but it should be setting it to statuses or itemdetails? [14:56] magnus: i did "update systempreferences set value = 'itemdetails' where variable = 'OPACItemsResultsDisplay';" and now the call numbers are displayed [15:00] gmcharlt: magnus: good catch - definition of OPACItemsResultsDisplay is wrong in searching.pref --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:25 UTC --- This bug was previously known as _bug_ 4268 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4268 Actual time not defined. Setting to 0.0
> ---- Reported by magnus@enger.priv.no 2010-02-25 14:45:52 ---- > The syspref toggels value between 1 and empty, but it > should be setting it to statuses or itemdetails? searching.pref says: - pref: OPACItemsResultsDisplay type: boolean choices: yes: Show no: "Don't show" - "an item's branch, location and call number in OPAC search results." Toggling between 1 and empty works fine if you modify opac-search.pl line 545 from: OPACItemsResultsDisplay => (C4::Context->preference("OPACItemsResultsDisplay") eq "itemdetails"?1:0), to: OPACItemsResultsDisplay => C4::Context->preference("OPACItemsResultsDisplay"), That makes the preference work in my tests without making any changes to the pref files or to the database.
Created attachment 2632 [details] [review] Proposed fix This patch changes how the preference is checked by opac-search.pl rather than changing the way the data is saved in the systempreferences table.
Don't forget to update database scripts also.
Created attachment 2657 [details] [review] restore OPACItemsResultsDisplay as a choice In order to avoid changes in an existing database, i propose to restore OPACItemsResultsDisplay as a choice (not a boolean) in search.pref file.
*** Bug 5558 has been marked as a duplicate of this bug. ***
I"m not sure I understand what the problem is, but I disagree with the second patch because it is not written as a sentence like other preferences and really makes no sense (and I know Koha).
(In reply to comment #6) > I"m not sure I understand what the problem is, but I disagree with the second > patch because it is not written as a sentence like other preferences and really > makes no sense (and I know Koha). I agree with you, I prefer to change syspref value into 1/0. Then Owen's patch is good. But we have to think about database content update no ?
Ok, looking at this it seems to me that Owen's patch will work for new databases but will not work for existing ones with old values in the systempreferences table. So I think Fridolyn is right and a database update is needed to go along with it. Marking Failed QA until a follow up is available - plz change status if you think otherwise.
I am a little confused about this patch. The discussion seems to be about a different patch than the one currently on the bug. Is a patch still required?
for me this is a duplicate of Bug 5409
Two years later and no follow up. As far as I can tell with the current state of things, the obsoleted patch seems to have been the cause of things discussed in comments 1 through 8 and leading up to jcamin's confusion in comment #9, but that obsolete patch is not in master. And the proposed fix was addressed in Bug 5409 as noted in comment #10. Given this inactivity, I am marking this resolved duplicate. *** This bug has been marked as a duplicate of bug 5409 ***