Bug 7153

Summary: Show Open Library as Search Target in "More Searches" in OPAC detail page
Product: Koha Reporter: Savitra Sirohi <savitra.sirohi>
Component: OPACAssignee: Savitra Sirohi <savitra.sirohi>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: chris, dpavlin, jonathan.druart, katrin.fischer, kyle.m.hall, m.de.rooy, nengard, noufal, paul.poulain, wizzyrea
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Patch
Updated patch
Update syspref OPACSearchForTitleIn to include Open Library as a target in More Searches in the OPAC detail page
Bug 7153 - Followup - Remove syspref modification
[SIGNED-OFF] Bug 7153 - Show Open Library as Search Target in "More Searches" in OPAC detail page

Description Savitra Sirohi 2011-11-04 09:57:49 UTC Comment hidden (obsolete)
Comment 1 Ian Walls 2011-11-04 18:19:17 UTC
The updatedatabase call here will wipe out any existing customized values libraries have in the SearchForTitleIn; I know several libraries with that done, and they would be very angry to have their customizations lost.

I recommend adding a WHERE clause to the SQL to only do the update if the system preference is still it's default value.  Only in that case can you assume it's safe to replace the data in the preference.
Comment 2 Liz Rea 2011-11-04 18:59:31 UTC
I agree with the failing of this - I'd be very cross if my customizations in that field were wiped out.
Comment 3 Savitra Sirohi 2011-11-05 04:34:42 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2011-11-05 07:24:16 UTC
I think we should not change existing entries at all.
People can add the search target if they want to - we can give examples for search targets on the wiki, the release notes or the newsletter. 
Also some libraries don't use the feature and leave the sys pref empty.
Comment 5 Ian Walls 2011-11-05 08:26:04 UTC
The hack I use to add Facebook and Twitter links to the biblio detail page would break if this attribute was appended.  We cannot assume that the value of the system preference is still just a list; it could be arbitrary HTML.

If the WHERE clause checked that the current value of SearchForTitleIn was the same as the default value (that is, unchanged since default), I think it would be safe to append it, but not in any other case.
Comment 6 Katrin Fischer 2011-11-05 08:34:09 UTC
I think perhaps do no updatedatabase at all - leave the running installations alone and only do it for new installations. That's how we do it for a lot of other things too.
Comment 7 Nicole C. Engard 2011-11-05 20:37:25 UTC
I agree with Katrin - this should effect upgrades cause I customize this preference for every library I train and I'd hate to see my work erased - and I'm sure so would they.

Nicole
Comment 8 Nicole C. Engard 2011-11-22 01:19:19 UTC
I meant to say that it 'should not' effect upgrades.
Comment 9 Dobrica Pavlinusic 2011-11-24 17:02:36 UTC
Would adding commented link if current value doesn't end in </li> be sensible solution here?

I would love to get commented-out link which I can than integrate into my html as opposed to hunting in database upgrades to find sensible template.

We don't really have good place to leave upgrade message for staff with sensible default link I think, or am I missing something? (other than inserting news in staff interface, and I don't really want to go there in the middle of conversation about database upgrades on koha-dev :-)
Comment 10 Nicole C. Engard 2011-12-14 14:22:06 UTC
I'm not sure I want any code going in my preferences if I have set them already.  The more searches code box can have things other than list items and your comment might not hurt anything ... but then again it might.  I see no reason not add this to new installs, but it shouldn't touch upgraded systems.  

I can however put a note in the manual on how to add a link to Open Library to your more searches menu for those who upgrade.

Nicole
Comment 11 Katrin Fischer 2011-12-14 14:22:59 UTC
+1 for Nicole's suggestion
Comment 12 Ian Walls 2011-12-14 22:05:50 UTC
Agreed.  Let's add the new option to new installs, and provide documentation on how to add it into existing installs.
Comment 13 Kyle M Hall 2012-06-09 09:20:22 UTC Comment hidden (obsolete)
Comment 14 Kyle M Hall 2012-06-09 09:24:42 UTC Comment hidden (obsolete)
Comment 15 Owen Leonard 2012-07-20 13:06:30 UTC
Created attachment 11044 [details] [review]
[SIGNED-OFF] Bug 7153 - Show Open Library as Search Target in "More Searches" in OPAC detail page

Update syspref OPACSearchForTitleIn to include Open Library as a target in More Searches in the OPAC detail page

http://bugs.koha-community.org/show_bug.cgi?id=7153
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Updatedatabase conflicts fixed, twice.
Comment 16 Jonathan Druart 2012-07-20 14:18:28 UTC
2 first patches are obsoletes ?
And just the last one needs QA ?
Comment 17 Owen Leonard 2012-07-20 14:27:33 UTC
(In reply to comment #16)
> 2 first patches are obsoletes ?
> And just the last one needs QA ?

Correct. Sorry about that.
Comment 18 Jonathan Druart 2012-07-23 12:48:15 UTC
It seems good for me. But I let Ian make the decision (he is the QA contact for this bug).
Comment 19 Marcel de Rooy 2012-07-23 13:15:20 UTC
(In reply to comment #18)
> It seems good for me. But I let Ian make the decision (he is the QA contact
> for this bug).
Jonathan, that was done default by the system (see history).
You can take over the QA field.
Comment 20 Jonathan Druart 2012-07-24 08:50:54 UTC
QA Comments:

Change the default value for syspref OPACSearchForTitleIn.
Impact only the new installations.

Marking as Passed QA
Comment 21 Chris Cormack 2012-07-26 21:48:02 UTC
Safe tiny enhancement that has no effect on upgrading users. But gives new Koha users Open Library as a search target in More Searches.

Pushed to 3.8.x, will be 3.8.4