Bug 11166 - branch filter in budgets admin uses pattern match instead of equals
Summary: branch filter in budgets admin uses pattern match instead of equals
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL: admin/aqbudgets.pl
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-30 08:46 UTC by Fridolin Somers
Modified: 2015-06-04 23:23 UTC (History)
3 users (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
Bug 11166 - branch filter in budgets admin uses pattern match instead of equals (1.43 KB, patch)
2013-10-30 09:48 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 11166 - branch filter in budgets admin uses pattern match instead of equals (1.53 KB, patch)
2013-12-16 09:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 11166 - branch filter in budgets admin uses pattern match instead of equals (1.58 KB, patch)
2013-12-20 17:41 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 Fridolin Somers 2013-10-30 08:46:27 UTC
In budgets administration, admin/aqbudgets.pl, there is a combobox for filtering by branch code.
The bug is that the filter uses a pattern match  instead of equals : 
  next unless $budget->{budget_branchcode} =~ m/$filter_budgetbranch/;
In this case, if there is a branch with code '1' and one with code '12', filtering by branch '1' will also show budgets of branch '12'.
Comment 1 Fridolin Somers 2013-10-30 09:48:05 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2013-12-16 09:41:28 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2013-12-20 17:41:19 UTC
Created attachment 23724 [details] [review]
Bug 11166 - branch filter in budgets admin uses pattern match instead of equals

In budgets administration, admin/aqbudgets.pl, there is a combobox for filtering by branch code.
The bug is that the filter uses a pattern match  instead of equals :
  next unless $budget->{budget_branchcode} =~ m/$filter_budgetbranch/;
In this case, if there is a branch with code '1' and one with code '12', filtering by branch '1' will also show budgets of branch '12'.

Test plan :
- Create a branch with code '1' and one with code '12'
- Create budgets in both branches
- Go to admin/aqbudgets.pl
- Filter by branch '12'
=> You see only budgets of this branch
- Filter by branch '1'
=> You see only budgets of this branch

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised
Comment 4 Galen Charlton 2013-12-20 22:52:02 UTC
Pushed to master.  Thanks, Fridolin!
Comment 5 Fridolin Somers 2013-12-30 09:54:07 UTC
Patch pushed to 3.14.x, will be in 3.14.2
Comment 6 Tomás Cohen Arazi 2014-01-15 17:48:29 UTC
This patch has been pushed to 3.12.x, will be in 3.12.9.

Thanks Fridolin!