https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42553
Martin Renvoize (ashimema) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43215 --- Comment #5 from Martin Renvoize (ashimema) <[email protected]> --- Investigated both issues raised in the comments above by tracing through this patch's test plan. 1. Reordering only persists for values that are already selected - this is expected, not a bug. In admin/preferences.pl _get_chunk(), the CHOICES list for multiple_sortable is built with: my @options = sort keys %{ $options{multiple_sortable} }; $chunk->{CHOICES} = [ map {...} uniq( @values, @options ) ]; @values is the previously saved, ordered list parsed from systempreferences.value (comma-separated); @options is every available choice, alphabetically re-sorted on every render. Order is therefore retained only for values that have actually been selected/saved - anything not selected is always shown alphabetically on the next render. This logic is unchanged by this patch (it is shared with the existing hardcoded multiple_sortable prefs such as OPACAuthorIdentifiersAndInformation), so it is working as intended. 2. The multiple "Saved preference ..." lines on save are a real quirk, but a pre-existing one in the shared checkbox/sortable widget - not something introduced by this patch. This branch's entire diff against main is the 11-line dispatcher in admin/preferences.pl; koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js is untouched. In that file, the ".preference-checkbox" change handler marks every checkbox of every checkbox-group preference on the page as "modified" (and a drag-reorder synthetically fires change() on the list's first checkbox, triggering the same thing), while KOHA.Preferences.Success() then emits one confirmation line per modified DOM element/id rather than one per underlying preference. It is reproducible today on main with OPACAuthorIdentifiersAndInformation / ArticleRequestsSupportedFormats. Filed bug 43215 (depends on this one) to track fixing the multi-message quirk separately, since it is a pre-existing widget issue rather than something this patch introduces. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43215 [Bug 43215] Checkbox/sortable system preferences show one 'Saved preference' message per option instead of per preference -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
