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

Brendan Lawlor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #57 from Brendan Lawlor <[email protected]> ---
This works as described. I'm only failing QA for a couple of minor issues.

1. In the staff interface it's possible for the Cart basketcount to display -1

To reproduce:
1. Enable AutoDeleteFromCartWhenHoldPlaced
2. Go to a bib record and add the bib to the cart
3. Click remove from cart
4. Place a hold on the item
5. See the cart shows (-1)

This would happen in other scenarios when the cookie intranet_bib_list exists
but is empty string and delSingleRecord() is called.

Then arrayRecords = valCookie.split("/"); evaluates to [""]
and pos = jQuery.inArray(biblionumber, arrayRecords); evaluates to -1

The fix should be in delSingleRecord() if pos === -1 just return out of the
function:
line 272: + if (pos === -1) { return; }

The same bug exists in the opac, but it's not shown in the ui. It's silent
because updateBasket checks if (updated_value > 0) I think it would still be
good to update delSingleRecord in the same way for the opac because this could
potentially lead to other bogs.


The second issue is very minor. the atomic update is idempotent, but the output
will always say "Added new system preference" It could be improved to warn when
the system preference already exists like:

if ($rows == 0) {
    say_warning( $out, "System preference 'AutoDeleteFromCartWhe
nHoldPlaced' already exists" );
} else {
    say_success( $out, "Added new system preference 'AutoDeleteF
romCartWhenHoldPlaced'" );
    }
},

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to