It would be nice to do an order search by branch.
We have several funds and accounts and would also be interested in a search by branch as we are a multicampus library
Created attachment 87477 [details] [review] Bug 14669: Add search option for managing library to orders search Currently the order search can't be limited by managing library. The patch adds the search option to the order history search form and a column for the managing library to the search results table. To test: - Create some baskets with orders - Set managing library for some, but also have some without - Apply patch - prove t/db_dependent/Acquisition.t - Go to Aquisition > Orders search tab on top > Advanced search link - Search for orders without limiting Orders with and without managing library set should show up - Limit search to a specific managing library - Verify results match expectations https://bugs.koha-community.org/show_bug.cgi?id=14667
Created attachment 89619 [details] [review] Bug 14669: Add search option for managing library to orders search Currently the order search can't be limited by managing library. The patch adds the search option to the order history search form and a column for the managing library to the search results table. To test: - Create some baskets with orders - Set managing library for some, but also have some without - Apply patch - prove t/db_dependent/Acquisition.t - Go to Aquisition > Orders search tab on top > Advanced search link - Search for orders without limiting Orders with and without managing library set should show up - Limit search to a specific managing library - Verify results match expectations
Rebased and fixed authorship (me, not kohadev-koha!)
Not sure if it's me or the patch, but when I try to apply, I get this message Traceback (most recent call last): File "/usr/local/bin/git-bz", line 2671, in <module> do_apply(*args) File "/usr/local/bin/git-bz", line 1734, in do_apply attachmentdata=True) File "/usr/local/bin/git-bz", line 1472, in load bug._load(bug_reference.id, attachmentdata) File "/usr/local/bin/git-bz", line 1228, in _load response = self.server.send_request("GET", url) File "/usr/local/bin/git-bz", line 998, in send_request cookies = self.get_cookie_string() File "/usr/local/bin/git-bz", line 991, in get_cookie_string self.cookies = get_bugzilla_cookies(host) NameError: global name 'host' is not defined
Hm, this is a little strange - patch applies cleanly for me. Just uploading it again to make sure!
Created attachment 90262 [details] [review] Bug 14669: Add search option for managing library to orders search Currently the order search can't be limited by managing library. The patch adds the search option to the order history search form and a column for the managing library to the search results table. To test: - Create some baskets with orders - Set managing library for some, but also have some without - Apply patch - prove t/db_dependent/Acquisition.t - Go to Aquisition > Orders search tab on top > Advanced search link - Search for orders without limiting Orders with and without managing library set should show up - Limit search to a specific managing library - Verify results match expectations
Hi Katrin, This works but it has a QA tool failure that I don't understand because it seems to be set up correctly: FAIL koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc FAIL valid_template options_for_libraries: not found IT may be a false positive, if it is just let me know and I'll sign it off. Cheers, Liz
(In reply to Liz Rea from comment #8) > Hi Katrin, > > This works but it has a QA tool failure that I don't understand because it > seems to be set up correctly: > > FAIL koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc > FAIL valid_template > options_for_libraries: not found > > IT may be a false positive, if it is just let me know and I'll sign it off. > > Cheers, > Liz After some checking I believe it's a false positive: The BLOCK options for libraries is defined in html_helpers.inc koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc:[% BLOCK options_for_libraries %] doc-head-close.inc includes html_helpers.inc: koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc:[% PROCESS 'html_helpers.inc' %] And koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt includes doc_head-close.inc. ... and the file koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc is included in histsearch.tt I think the test might not cope well with all this. I am still amending the patch to make a slight change: In the first version the filter preselected on the user's current branch which will limit search results and change behaviour. I have now changed it to select 'All libraries' by default.
Created attachment 92343 [details] [review] Bug 14669: Add search option for managing library to orders search Currently the order search can't be limited by managing library. The patch adds the search option to the order history search form and a column for the managing library to the search results table. To test: - Create some baskets with orders - Set managing library for some, but also have some without - Apply patch - prove t/db_dependent/Acquisition.t - Go to Aquisition > Orders search tab on top > Advanced search link - Search for orders without limiting Orders with and without managing library set should show up - Limit search to a specific managing library - Verify results match expectations
Owen, just to make sure, could you maybe verify my conclusions about the includes/QA failure?
(In reply to Katrin Fischer from comment #11) > Owen, just to make sure, could you maybe verify my conclusions about the > includes/QA failure? I agree that it looks like a false positive. When the page is displaying search results and the form is in the sidebar is it possible to preselect the managing library the user just searched for? To be consistent it should remember their selection.
Tests pass, but filtering does not seem to work. I've created baskets with orders. One is managed by centerville the other by none. Standard search returns both results, but search filtered by managed by centerville also returns both. I would expect to only return those managed by centerville. Managing library is also not displayed in the basket overview datatable. Hth, Alex
Created attachment 93583 [details] [review] Bug 14669: Add search option for managing library to orders search Currently the order search can't be limited by managing library. The patch adds the search option to the order history search form and a column for the managing library to the search results table. To test: - Create some baskets with orders - Set managing library for some, but also have some without - Apply patch - prove t/db_dependent/Acquisition.t - Go to Aquisition > Orders search tab on top > Advanced search link - Search for orders without limiting Orders with and without managing library set should show up - Limit search to a specific managing library - Verify results match expectations
Created attachment 93587 [details] [review] Bug 14669: Add search option for managing library to orders search Currently the order search can't be limited by managing library. The patch adds the search option to the order history search form and a column for the managing library to the search results table. To test: - Create some baskets with orders - Set managing library for some, but also have some without - Apply patch - prove t/db_dependent/Acquisition.t - Go to Aquisition > Orders search tab on top > Advanced search link - Search for orders without limiting Orders with and without managing library set should show up - Limit search to a specific managing library - Verify results match expectations Signed-off-by: Alex Sassmannshausen <alex@komputilo.eu>
Created attachment 93669 [details] [review] Bug 14669: Add search option for managing library to orders search Currently the order search can't be limited by managing library. The patch adds the search option to the order history search form and a column for the managing library to the search results table. To test: - Create some baskets with orders - Set managing library for some, but also have some without - Apply patch - prove t/db_dependent/Acquisition.t - Go to Aquisition > Orders search tab on top > Advanced search link - Search for orders without limiting Orders with and without managing library set should show up - Limit search to a specific managing library - Verify results match expectations Signed-off-by: Alex Sassmannshausen <alex@komputilo.eu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nice work! Pushed to master for 19.11.00
Created attachment 93907 [details] [review] Bug 14669: (RM follow-up) Ensure updated include compiles The introduction of `options_for_libraries` in the filter-orders include template requires that we process 'html_helpers' within the file to ensure it always compiles. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>