[Bug 28297] New: can't save system preference and field not marked as modified when changing value
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Bug ID: 28297 Summary: can't save system preference and field not marked as modified when changing value Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: victor@tuxayo.net QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com == Test plan == 1. Search any syspref that has a text input 2. input a value, like 3, you see "modified" 3. save 4. refresh (tech note: the <input> will now have value=3) 5. input 5, you see "modified" 6. save (tech note: the <input> still has value=3, this is the cause) 7. input 3, you don't see "modified" (this in wrong) 8. save 9 "nothing to save", this is wrong -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |bibliothek@th-wildau.de |ity.org | CC| |bibliothek@th-wildau.de -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195538&action=edit Bug 28297: Allow syspref text fields to be saved when content changed to original value This fixes the behavior on changed system preferences in HTML input text fields. Preferences which are changed back to the original value can be saved now without reloading the system pref page. This will only affect input fields with type=text as they have the property defaultValue which is checked to highlight a field as 'modified'. Testplan: a) take a syspref with an HTML text input field f.e. AccessControlAllowOrigin b) write '*' into the iput field. Notice that the preference is marked 'modified'. Click 'save' c) now got to the text field again and delete that '*'. Notice the preference does not get marked as modified and can theefore not be saved. d) apply patch and reload page e) repeat b) and c) and notice that the preference gets marked 'modified' on both cases. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195538|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 195689 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195689&action=edit Bug 28297: Allow syspref text fields to be saved when content changed to original value This fixes the behavior on changed system preferences in HTML input text fields. Preferences which are changed back to the original value can be saved now without reloading the system pref page. This will only affect input fields with type=text as they have the property defaultValue which is checked to highlight a field as 'modified'. Testplan: a) take a syspref with an HTML text input field f.e. AccessControlAllowOrigin b) write '*' into the iput field. Notice that the preference is marked 'modified'. Click 'save' c) now got to the text field again and delete that '*'. Notice the preference does not get marked as modified and can theefore not be saved. d) apply patch and reload page e) repeat b) and c) and notice that the preference gets marked 'modified' on both cases. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Summary|can't save system |Can't save system |preference and field not |preference and field not |marked as modified when |marked as modified when |changing value |changing value --- Comment #3 from David Nind <david@davidnind.com> --- I've signed off, but could only replicate the issue when using Firefox. I couldn't reproduce the issue using a Chrome-based browser. (No change in behavour before and after the patch using a Chrome-based browser.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 --- Comment #4 from Jan Kissig <bibliothek@th-wildau.de> --- (In reply to David Nind from comment #3)
I've signed off, but could only replicate the issue when using Firefox.
I couldn't reproduce the issue using a Chrome-based browser. (No change in behavour before and after the patch using a Chrome-based browser.)
Thank you for signing off David. I just tested on Chromium and in my case the behavior works as described in the test plan. Could you check if Chrome did maybe get the old javascript from cache? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 --- Comment #5 from David Nind <david@davidnind.com> --- (In reply to Jan Kissig from comment #4)
(In reply to David Nind from comment #3)
I've signed off, but could only replicate the issue when using Firefox.
I couldn't reproduce the issue using a Chrome-based browser. (No change in behavour before and after the patch using a Chrome-based browser.)
Thank you for signing off David. I just tested on Chromium and in my case the behavior works as described in the test plan. Could you check if Chrome did maybe get the old javascript from cache?
Please ignore my comment. What I was doing, was searching for the system preference again. If I stay on the same page with the system preference (without searching for the system preference again, or reloading the page), I can reproduce the behavour as described for Chromoum-based browsers. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195689|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 196699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196699&action=edit Bug 28297: Allow syspref text fields to be saved when content changed to original value This fixes the behavior on changed system preferences in HTML input text fields. Preferences which are changed back to the original value can be saved now without reloading the system pref page. This will only affect input fields with type=text as they have the property defaultValue which is checked to highlight a field as 'modified'. Testplan: a) take a syspref with an HTML text input field f.e. AccessControlAllowOrigin b) write '*' into the iput field. Notice that the preference is marked 'modified'. Click 'save' c) now got to the text field again and delete that '*'. Notice the preference does not get marked as modified and can theefore not be saved. d) apply patch and reload page e) repeat b) and c) and notice that the preference gets marked 'modified' on both cases. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |System preferences with a release notes| |text input field can now be | |saved when they are changed | |back to the original value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28297 --- Comment #8 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org