Bugzilla – Attachment 138892 Details for
Bug 31297
Cannot add new subscription patterns from edit subscription page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31297: Fix creation of new subscription pattern from edit subscription
Bug-31297-Fix-creation-of-new-subscription-pattern.patch (text/plain), 1.54 KB, created by
Jonathan Druart
on 2022-08-09 10:35:22 UTC
(
hide
)
Description:
Bug 31297: Fix creation of new subscription pattern from edit subscription
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-08-09 10:35:22 UTC
Size:
1.54 KB
patch
obsolete
>From d75da67aef28f7ee14d106021ec58b8749d944fc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 9 Aug 2022 12:30:40 +0200 >Subject: [PATCH] Bug 31297: Fix creation of new subscription pattern from edit > subscription > >When editing a subscription there is the possibility to create a new >subscription pattern. But this form does not have a "description" for >this pattern, and the DBMS does not allow description to be NULLed. > >Error is: DBI Exception: DBD::mysql::st execute failed: Field 'description' doesn't have a default value > >This patch takes the shortest path to fix the 500 error (with no >feedback sent to the end user), but there are other better ways to fix >it: >1. Allow subscription_numberpatterns.description to be NULL, or >2. Add a description field on the form > >Test plan: >Create a new subscription, on the second page click "show advanced >pattern", then "Modify pattern", enter a name and click "Save as new pattern" >--- > serials/create-numberpattern.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/serials/create-numberpattern.pl b/serials/create-numberpattern.pl >index a28ef0d4155..3c5055bd1f9 100755 >--- a/serials/create-numberpattern.pl >+++ b/serials/create-numberpattern.pl >@@ -42,6 +42,7 @@ foreach (qw/ numberingmethod label1 label2 label3 add1 add2 add3 > } > # patternname is label in database > $numberpattern->{'label'} = $input->param('patternname'); >+$numberpattern->{'description'} = $input->param('patternname'); > > # Check if pattern already exist in database > my $dbh = C4::Context->dbh; >-- >2.25.1
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 31297
:
138892
|
160244
|
160263
|
160307