Bugzilla – Attachment 86632 Details for
Bug 22489
Onboarding tool fails due to inserting maxissueqty into IssuingRule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22489: Update onboarding tool for bug 18925
Bug-22489-Update-onboarding-tool-for-bug-18925.patch (text/plain), 3.03 KB, created by
Jonathan Druart
on 2019-03-14 21:15:11 UTC
(
hide
)
Description:
Bug 22489: Update onboarding tool for bug 18925
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-03-14 21:15:11 UTC
Size:
3.03 KB
patch
obsolete
>From 440c278450f4db3c613e64d62ab49c8c17d81e69 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 12 Mar 2019 17:29:38 +0000 >Subject: [PATCH] Bug 22489: Update onboarding tool for bug 18925 > >When going through the onboarding process, the tool fails on submit of step 5, >due to changes made in the database structure and rule definitions by bug >18925. > >This patch fixes this, adding code that creates a circulation rule where an >issuing rule is also created in onboarding.pl. It removes maxissueqty from >being sent with params to make an issuing rule, and adds it instead to the >params to make a circulation rule, to reflect the changes that have been made >in the database. > >Test plan: >1) Drop and recreate your database >2) Reload the staff client and follow the installer and onboarding >process >3) Confirm that the process finishes without errors > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Bug 22489: (follow-up) Correctly set success messages > >The original patch was duplicating the success message upon successful >circ rule insertion. This corrects that. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Patches squashed for readability >--- > installer/onboarding.pl | 27 ++++++++++++++++++++++----- > 1 file changed, 22 insertions(+), 5 deletions(-) > >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index 1acc420c43..77aa12018a 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -251,7 +251,6 @@ if ( $step == 5 ) { > branchcode => $branchcode, > categorycode => $categorycode, > itemtype => $itemtype, >- maxissueqty => $maxissueqty, > renewalsallowed => $renewalsallowed, > renewalperiod => $renewalperiod, > issuelength => $issuelength, >@@ -262,11 +261,29 @@ if ( $step == 5 ) { > my $issuingrule = Koha::IssuingRule->new($params); > eval { $issuingrule->store; }; > >- unless ($@) { >- push @messages, { code => 'success_on_insert_circ_rule' }; >- } >- else { >+ if ($@) { > push @messages, { code => 'error_on_insert_circ_rule' }; >+ } else { >+ >+ eval { >+ Koha::CirculationRules->set_rules( >+ { >+ categorycode => $categorycode, >+ itemtype => $itemtype, >+ branchcode => $branchcode, >+ rules => { >+ maxissueqty => $maxissueqty, >+ } >+ } >+ ); >+ }; >+ >+ unless ($@) { >+ push @messages, { code => 'success_on_insert_circ_rule' }; >+ } >+ else { >+ push @messages, { code => 'error_on_insert_circ_rule' }; >+ } > } > } > >-- >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 22489
:
86496
|
86497
|
86547
|
86561
|
86562
|
86577
|
86578
| 86632