Bug 10913 - non executed code in acqui/basket.pl ?
Summary: non executed code in acqui/basket.pl ?
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P3 normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-19 07:42 UTC by Mathieu Saby
Modified: 2015-12-03 22:11 UTC (History)
2 users (show)

See Also:
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 (7.24 KB, patch)
2015-04-22 09:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 10913: The delete basket confirmation page is never displayed (7.79 KB, patch)
2015-04-30 02:33 UTC, Mark Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 10913: The delete basket confirmation page is never displayed (7.86 KB, patch)
2015-04-30 06:21 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!