Bugzilla – Attachment 165200 Details for
Bug 34963
Unable to delete fields in suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34963: Restore the ability to blank fields when editing a suggestion
Bug-34963-Restore-the-ability-to-blank-fields-when.patch (text/plain), 1.56 KB, created by
Nick Clemens (kidclamp)
on 2024-04-19 13:42:25 UTC
(
hide
)
Description:
Bug 34963: Restore the ability to blank fields when editing a suggestion
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-04-19 13:42:25 UTC
Size:
1.56 KB
patch
obsolete
>From cb8664ddf513c48bf426719d4d395b279281f81f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 17 Apr 2024 11:48:16 +0200 >Subject: [PATCH] Bug 34963: Restore the ability to blank fields when editing a > suggestion > >Regression introduced by bug 23991. >We don't want to remove the fields from the edition if they are empty. > >Ideally we should have separate parameters for edition and search, but >this is the low-effort fix, and hopefully won't introduce side-effects. > >Test plan: >Try to edit a suggestion and blank some fields >Try to search for suggestions using the search form on the left of the >screen > >Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > suggestion/suggestion.pl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index fa462bbf8af..4ee69957f03 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -117,8 +117,11 @@ foreach (keys %$suggestion_ref){ > } > delete $suggestion_only->{branchcode} if $suggestion_only->{branchcode} eq '__ANY__'; > delete $suggestion_only->{budgetid} if $suggestion_only->{budgetid} eq '__ANY__'; >-while ( my ( $k, $v ) = each %$suggestion_only ) { >- delete $suggestion_only->{$k} if $v eq ''; >+ >+unless ( $op eq 'cud-save' ) { >+ while ( my ( $k, $v ) = each %$suggestion_only ) { >+ delete $suggestion_only->{$k} if $v eq ''; >+ } > } > > my ( $template, $borrowernumber, $cookie, $userflags ) = get_template_and_user( >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34963
:
164986
|
165020
| 165200