[Koha-bugs] [Bug 22489] Onboarding tool fails due to inserting maxissueqty into IssuingRule

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 12 18:07:31 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22489

--- Comment #6 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Comment on attachment 86496
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86496
Bug 22489: Fixed issue with onboarding tool failing at step 5

Review of attachment 86496:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=22489&attachment=86496)
-----------------------------------------------------------------

Sorry.. I think there's a bit more work to do here I'm afraid.

::: admin/smart-rules.pl
@@ +223,5 @@
>      }
>  
> +    warn $bor;
> +    warn $itemtype;
> +    warn $br;

Cleaning up the warnings again would be great ;)

@@ +302,5 @@
>              $sth_insert->execute($branch, $holdallowed, $hold_fulfillment_policy, $returnbranch);
>          }
>  
> +        warn $branch;
> +        warn $categorycode;

More warnings ;)

::: installer/onboarding.pl
@@ +31,5 @@
>  use Koha::Patron::Categories;
>  use Koha::ItemTypes;
>  use Koha::IssuingRules;
> +use Koha::CirculationRules;
> +use Switch;

Switch is recommended against... and doesn't appear to be used anywhere either.

@@ +258,5 @@
>              issuelength     => $issuelength,
>              lengthunit      => $lengthunit,
>              onshelfholds    => $onshelfholds,
>          };
> +        $branchcode = $branchcode if $branchcode ne '*';

Erm.. this doesn't make sense "Set branchcode to branchcode if branchcode not
equal to '*'".. What were you intending here?

@@ +260,5 @@
>              onshelfholds    => $onshelfholds,
>          };
> +        $branchcode = $branchcode if $branchcode ne '*';
> +        $branchcode = undef if $branchcode eq '*';
> +        $categorycode = $categorycode if $categorycode ne '*';

As above.. I'm confused as to what the intention is here?

@@ +262,5 @@
> +        $branchcode = $branchcode if $branchcode ne '*';
> +        $branchcode = undef if $branchcode eq '*';
> +        $categorycode = $categorycode if $categorycode ne '*';
> +        $categorycode = undef if $categorycode eq '*';
> +        $itemtype = $itemtype if $itemtype ne '*';

and again..

@@ +278,4 @@
>          eval { $issuingrule->store; };
>  
> +        my $circulationrule = Koha::CirculationRule->new($circulationruleparams);
> +        eval { $circulationrule->store; };

New eval, but we're no longer catching errors for the first insert.. we'd need
to catch errors above this line too..

@@ +287,4 @@
>              push @messages, { code => 'error_on_insert_circ_rule' };
>          }
>      }
> +    warn Koha::CirculationRules->count;

Another warn ;)

::: koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt
@@ +98,5 @@
> +                                    <label for="maxissueqty" class="required">Current checkouts allowed: </label>
> +                                    <input type="number" min="0" name="maxissueqty" id="maxissueqty" size="10" value="50" class="required" required="required" />
> +                                    <span class="required">Required</span>
> +                                </li>
> +                                <li>

This looks to me as though it's just been moved.. not sure why yet as I've not
actually inspected the new UI layout.. perhaps it makes good sense to move it..
perhaps not.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list