Bug 10913

Summary: non executed code in acqui/basket.pl ?
Product: Koha Reporter: Mathieu Saby <mathsabypro>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P3 CC: jonathan.druart, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 10913: The delete basket confirmation page is never displayed
Bug 10913: The delete basket confirmation page is never displayed
[PASSED QA] Bug 10913: The delete basket confirmation page is never displayed

Description Mathieu Saby 2013-09-19 07:42:29 UTC
I think there is a block of useless code in acqui/basket.pl but I am not sure, and I don't know if it is a problem.

lines 125-163, there is a block of code which is supposed to be executed if condition of line 124 is true :
"elsif ( $op eq 'del_basket') {"

But I see no other occurence of "del_basket".
So I suppose it is always false...

M. Saby
Comment 1 Mathieu Saby 2013-10-09 20:32:04 UTC
I update priority. Maybe it is an important issue, I don't know...

M. Saby
Comment 2 Jonathan Druart 2015-04-22 09:51:07 UTC Comment hidden (obsolete)
Comment 3 Mark Tompsett 2015-04-30 02:33:17 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2015-04-30 06:21:03 UTC
Created attachment 38714 [details] [review]
[PASSED QA] Bug 10913: The delete basket confirmation page is never displayed

This condition is never reached, the confirmation to delete a basket is
done with a popup in the template.

Test plan:
Confirm you don't find any regression when creation/editing and deleting
a basket.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: I didn't create or edit. However, the only perl script that uses
      the template is acqui/basket.pl and the only place delete_confirm
      is set in acqui/basket.pl is in that code which is only called if
      del_basket actually existed anywhere else, which it doesn't.
      I did have two baskets, one with two transfers from the first, so
      I transferred one back, and then proceeded to test the two delete
      buttons in the modal. No issues. Cancel (to close the modal) works
      too.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2015-05-15 19:03:19 UTC
Patch pushed to master.

Thanks Jonathan!