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

--- Comment #10 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 194987
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194987&action=edit
Bug 41801: (QA follow-up) Guard lowestPriority rank clamping against empty rank

When FixPriority is called with a reserve_id but no rank (rank defaults to ''),
the empty string evaluates to 0 numerically, satisfying `$rank <=
$highest_non_lowest_priority`. This caused the clamping block to unexpectedly
set rank to a positive value, which then triggered an unintended splice and
moved the hold.

Add `$rank > 0` to the guard condition so the block only fires when an explicit
positive rank was requested, matching the pre-existing semantics of the splice
block below it.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to