Bug 11464 - Saving preferences - Nothing to Save
Summary: Saving preferences - Nothing to Save
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-31 23:05 UTC by Christopher Brannon
Modified: 2016-12-05 21:23 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11464: Prevent wrong "nothing to save" message on saving syspref (1.88 KB, patch)
2015-04-23 15:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
[Signed-off] Bug 11464: Prevent wrong "nothing to save" message on saving syspref (2.07 KB, patch)
2015-04-23 19:45 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 11464: Prevent wrong "nothing to save" message on saving syspref (2.12 KB, patch)
2015-04-28 21:08 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2013-12-31 23:05:22 UTC
If deleting contents from a textbox in preferences.pl, the system doesn't always register changes, and will respond with "Nothing to Save" instead of saving changes.

To Test:
For example, I'll use PatronSelfRegistrationBorrowerUnwantedField

-Type "othernames" and click "Save all OPAC preferences"
-Select text in that field and press "delete" key.
-Note that Koha does not indicate that anything has been modified.
-Click "Save all OPAC preferences"
-Koha says "Nothing to Save"

In order to delete and save, you have to type something in the box for it to register.  So, you have to select, type, delete, then save.

Christopher
Comment 1 Jonathan Druart 2015-04-23 15:05:45 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-04-23 19:45:13 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-04-28 21:08:48 UTC
Created attachment 38616 [details] [review]
[PASSED QA] Bug 11464: Prevent wrong "nothing to save" message on saving syspref

Sometime you get the "Nothing to save" message when clicking on the "save
all preferences" button, even if something has changed.

On irritating behavior is the middle click: if you use the middle click
to paste some text in the input, the "keyup" event won't be trigger.
This patch replaces the "keyup" event with the "change", which works
as we want here.

The issues:
1/ Search for "wanted" (admin/preferences.pl?op=search&searchfield=wanted)
Empty the input, click save
Type something and remove it
You are able to save, but nothing has changed
2/ Put something in your selection buffer and use the middle click to
paste it in the input.
No change detected.

Test plan:
Confirm the issues are fixed and you don't find any regression
Note that now the "(modified)" string is displayed when the input loses
the focus.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi 2015-05-07 15:36:21 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 5 Chris Cormack 2015-05-17 06:57:03 UTC
Pushed to 3.18.x will be in 3.18.7