[Koha-bugs] [Bug 25554] Refactor rule kinds assignments in CirculationRules.pm

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 8 20:58:54 CEST 2020


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

Andrew Nugged <nugged at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |In Discussion

--- Comment #7 from Andrew Nugged <nugged at gmail.com> ---
But that's not only about the assignment of $RULE_KINDS on the beginning,
$scope3 also used in the code further, in two places:

>+my $scope3 = [ 'branchcode', 'categorycode', 'itemtype' ];
...

>     my $order_by = $params->{order_by}
>-      // { -desc => [ 'branchcode', 'categorycode', 'itemtype' ] };
>+      // { -desc => $scope3 };
...

>     # Enforce scope; a rule should be set for its defined scope, no more, no less.
>-    foreach my $scope_level ( qw( branchcode categorycode itemtype ) ) {
>+    foreach my $scope_level ( @$scope3 ) {
>         if ( grep /$scope_level/, @{ $kind_info->{scope} } ) {

so just making pairs rules/scopes won't solve this, more advanced refactoring
then needed. Let's think about this, yes (just thinking aloud here too :) ).

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


More information about the Koha-bugs mailing list