Summary: | Incorrect check of OPACItemsResultsDisplay preference | ||
---|---|---|---|
Product: | Koha | Reporter: | Magnus Enger <magnus> |
Component: | System Administration | Assignee: | Owen Leonard <oleonard> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | fridolin.somers, januszop, mtompset, nengard |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5409 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 1348 | ||
Attachments: |
Proposed fix
restore OPACItemsResultsDisplay as a choice |
Description
Chris Cormack
2010-05-21 01:25:10 UTC
> ---- 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 *** |