Bugzilla – Attachment 96729 Details for
Bug 24244
Cannot create suggestion with branch set to 'Any'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24244: Send null instead of empty string if branch not set
Bug-24244-Send-null-instead-of-empty-string-if-bra.patch (text/plain), 1.06 KB, created by
Katrin Fischer
on 2020-01-02 07:03:38 UTC
(
hide
)
Description:
Bug 24244: Send null instead of empty string if branch not set
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-01-02 07:03:38 UTC
Size:
1.06 KB
patch
obsolete
>From 17ebb9f6fc51ddffa5336e1314ff442fe0a168b8 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 13 Dec 2019 19:58:52 +0000 >Subject: [PATCH] Bug 24244: Send null instead of empty string if branch not > set > >Fix NewSuggestion if branchcode is passed with an empty string. >Error was "Broken FK constraint" > >Test plan: >Create a new suggestion, select "any" for the library. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Suggestions.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index 764c331752..836b13fc42 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -448,6 +448,8 @@ sub NewSuggestion { > > $suggestion->{suggesteddate} = dt_from_string unless $suggestion->{suggesteddate}; > >+ delete $suggestion->{branchcode} if $suggestion->{branchcode} eq ''; >+ > my $suggestion_object = Koha::Suggestion->new( $suggestion )->store; > my $suggestion_id = $suggestion_object->suggestionid; > >-- >2.11.0
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 24244
:
96284
|
96293
|
96294
|
96728
| 96729