Bug 11056 - dead code in basketgroup.pl : remove code depending on "validate" param
Summary: dead code in basketgroup.pl : remove code depending on "validate" param
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Mathieu Saby
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-15 21:53 UTC by Mathieu Saby
Modified: 2014-12-07 20:07 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
[PATCH] Bug 11056 : Delete dead code in basketgroup.pl (3.65 KB, patch)
2013-12-18 17:15 UTC, Mathieu Saby
Details | Diff | Splinter Review
[PATCH] Bug 11056 : Delete dead code in basketgroup.pl (6.36 KB, patch)
2013-12-20 22:44 UTC, Mathieu Saby
Details | Diff | Splinter Review
Bug 11056 : Delete dead code in basketgroup.pl (6.60 KB, patch)
2014-01-17 16:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11056 : Delete dead code in basketgroup.pl (6.67 KB, patch)
2014-01-17 17:22 UTC, Kyle M Hall
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-10-15 21:53:43 UTC
Some code is dead in basketgroup.pl
all the block depending on 
"($op eq 'validate')" clause

the "validate" parameter is no more used in template, since a Biblibre commit has rewritten basketgroup template in 2009 : 
http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=263961312c1ff7605ed1e28df40191ab01a75af9

M. Saby
Comment 1 Mathieu Saby 2013-12-18 17:15:30 UTC Comment hidden (obsolete)
Comment 2 Mathieu Saby 2013-12-18 17:15:47 UTC
In basketgroup.pl, some code is supposed to be executed if $op = "validate".
But this value is no more assigned to $op variable since 2009.

This patch suppressed dead code.
No functional changes expected

Regression test : check basketgroup are shown as before the patch, and can be closed and reopen.
Check you can create a basketgroup when you close a basket.


M. Saby
Comment 3 Mathieu Saby 2013-12-20 22:06:09 UTC
Functions parseinputbaskets and parseinputbasketgroups are only called by this dead code. So they could be removed too.

M. Saby
Comment 4 Mathieu Saby 2013-12-20 22:44:48 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2014-01-17 16:18:53 UTC Comment hidden (obsolete)
Comment 6 Mathieu Saby 2014-01-17 16:33:57 UTC
Oh, I did not even know "git grep" command!
Mathieu
Comment 7 Kyle M Hall 2014-01-17 17:22:56 UTC
Created attachment 24526 [details] [review]
Bug 11056 : Delete dead code in basketgroup.pl

In basketgroup.pl, some code is supposed to be executed if $op = "validate".
But this value is no more assigned to $op variable since 2009.

This patch suppressed dead code, along with parseinputbaskets and parseinputbasketgroups subs, which are obsolete.
No functional changes expected

Regression test :
Check basketgroup are shown as before the patch, and can be closed and reopen.
Check you can add or remove a basket from a basketgroup, and change informations about it (like delivery place)
Check you can create a basketgroup when you close a basket.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The following commands return nothing:
- grep validate acqui/basketgroup.tt
- grep -R basketgroup.pl -C 2 | grep validate
- git grep parseinputbaskets
- git grep parseinputbasketgroups
- git grep basketgroup.pl | grep validate

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Galen Charlton 2014-01-17 21:20:45 UTC
Pushed to master.  Thanks, Mathieu!