Created attachment 6190 [details] [review] Patch Show Open Library as Search Target in "More Searches" in OPAC detail page. Updated syspref OPACSearchForTitleIn to include Open Library as a search target
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.
I agree with the failing of this - I'd be very cross if my customizations in that field were wiped out.
Created attachment 6218 [details] [review] Updated patch Fresh patch, this time fixing issue raised by QA. The Open Library search target is appended to whatever list of search targets the library may have in the syspref at the time of update
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.
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.
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.
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
I meant to say that it 'should not' effect upgrades.
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 :-)
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
+1 for Nicole's suggestion
Agreed. Let's add the new option to new installs, and provide documentation on how to add it into existing installs.
Created attachment 9991 [details] [review] Update syspref OPACSearchForTitleIn to include Open Library as a target in More Searches in the OPAC detail page
Created attachment 9992 [details] [review] Bug 7153 - Followup - Remove syspref modification Remove the database update that is modifying an existing systempreference.
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.
2 first patches are obsoletes ? And just the last one needs QA ?
(In reply to comment #16) > 2 first patches are obsoletes ? > And just the last one needs QA ? Correct. Sorry about that.
It seems good for me. But I let Ian make the decision (he is the QA contact for this bug).
(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.
QA Comments: Change the default value for syspref OPACSearchForTitleIn. Impact only the new installations. Marking as Passed QA
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