There is a 'authorisedby' DB field in the aqbasket table but the interface does not provide any way to search orders using this field. This field is automatically filled with the borrowernumber of the basket's creator.
Created attachment 31682 [details] [review] Bug 12944: Refactor the patron autocomplete The patron list feature uses an autocomplete field to search patron. This will be reused in the next patch. This patch should not introduce any behavior change.
Created attachment 31683 [details] [review] Bug 12944: Search orders by basket creator This patch adds the ability to search orders using the basket creator. Test plan: - go on the order advanced search form (acqui/histsearch.pl) - use the autocomplete input to search patrons - launch the search and verify the results are consistent with the values you have filled.
Created attachment 31824 [details] [review] Bug 12944: Refactor the patron autocomplete I've applied the patch against master 3.17.00.025 Everything is OK. So I pass the patch to "Signed Off" status.
Created attachment 31825 [details] [review] Bug 12944: Search orders by basket creator
Created attachment 31987 [details] [review] [PASSED QA] Bug 12944: Refactor the patron autocomplete The patron list feature uses an autocomplete field to search patron. This will be reused in the next patch. This patch should not introduce any behavior change. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 31988 [details] [review] [PASSED QA] Bug 12944: Search orders by basket creator This patch adds the ability to search orders using the basket creator. Test plan: - go on the order advanced search form (acqui/histsearch.pl) - use the autocomplete input to search patrons - launch the search and verify the results are consistent with the values you have filled. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 31989 [details] [review] [PASSED QA] Bug 12944 [QA Followup] - Rename patrons.pl to patrons.js Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 32922 [details] [review] Bug 12944 [Patron lists follow-up] There is no way to search orders by creator This bug modifies not just the order search form but also the patron lists feature, making use of the new script for building a patron autocomplete form. However, the test plan does not specify that the patron lists form be tested as well, and it doesn't work. This patch corrects a minor flaw which broke the patron search autocomplete when adding patrons to a patron list. To test, create a new patron list if necessary. Click the "add patrons" button to add patrons to the list. In the patron search form type a partial patron name. You should get an autocomplete dropdown of existing patrons. Selecting one should work correctly.
Created attachment 32931 [details] [review] Bug 12944 [Patron lists follow-up] There is no way to search orders by creator I've applied the 4 patches against master 3.17.00.035 The error that Owen mentioned in comment 8 is properly fixed by the 4-th patch. Everything is OK. So I pass the patch to "Signed Off" status. [I release to bugzilla [and make obsolete] only the 4-th file "[Patron lists follow-up] There is no way to search orders by creator".]
After refreshing the page multiple times, there is still an erorr on the acq history page after a search: TypeError: $(...).autocomplete(...).data(...) is undefined http://localhost:8080/intranet-tmpl/js/autocomplete/patrons.js Line 20 I did an 'empty' search from the orders search tab at the top.
NB. On patron list, there is a little redundancy in the removing patrons' options.
Created attachment 33197 [details] [review] Bug 12944: Refactor the patron autocomplete The patron list feature uses an autocomplete field to search patron. This will be reused in the next patch. This patch should not introduce any behavior change. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Bug 12944 [QA Followup] - Rename patrons.pl to patrons.js Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33198 [details] [review] Bug 12944: Search orders by basket creator This patch adds the ability to search orders using the basket creator. Test plan: - go on the order advanced search form (acqui/histsearch.pl) - use the autocomplete input to search patrons - launch the search and verify the results are consistent with the values you have filled. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33199 [details] [review] Bug 12944 [Patron lists follow-up] There is no way to search orders by creator This bug modifies not just the order search form but also the patron lists feature, making use of the new script for building a patron autocomplete form. However, the test plan does not specify that the patron lists form be tested as well, and it doesn't work. This patch corrects a minor flaw which broke the patron search autocomplete when adding patrons to a patron list. To test, create a new patron list if necessary. Click the "add patrons" button to add patrons to the list. In the patron search form type a partial patron name. You should get an autocomplete dropdown of existing patrons. Selecting one should work correctly. Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Created attachment 33200 [details] [review] Bug 12944: The autocomplete should only be applied for the form If it's the result view, the autocomplete should not be apply to the input element (it does not exist).
(In reply to Katrin Fischer from comment #10) > I did an 'empty' search from the orders search tab at the top. Fixed! I also squashed the Kyle's patch (in order to avoid the creation and the deletion of a file in the git tree).
(In reply to Paola Rossi from comment #11) > NB. On patron list, there is a little redundancy in the removing patrons' > options. Yes I agree, but not introduced by this patch. You can open a new bug report if you want.
Comment on attachment 33197 [details] [review] Bug 12944: Refactor the patron autocomplete Review of attachment 33197 [details] [review]: ----------------------------------------------------------------- Hi Jonathan, overall this looks good :) ::: koha-tmpl/intranet-tmpl/js/autocomplete/patrons.js @@ +32,5 @@ > + }); > +} > + > +function AddPatron( patron_name, value, container, input_name ) { > + div = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'> " + _("Remove") + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>"; But by moving the Javascript into a separate js file, the "Remove" will no longer be translatable. Could you please fix?
Created attachment 34781 [details] [review] Bug 12944: Fix regression on translating This patch fixes the translation for the "Remove" button. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 35589 [details] [review] [PASSED QA] Bug 12944: Refactor the patron autocomplete The patron list feature uses an autocomplete field to search patron. This will be reused in the next patch. This patch should not introduce any behavior change. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Bug 12944 [QA Followup] - Rename patrons.pl to patrons.js Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 35590 [details] [review] [PASSED QA] Bug 12944: Search orders by basket creator This patch adds the ability to search orders using the basket creator. Test plan: - go on the order advanced search form (acqui/histsearch.pl) - use the autocomplete input to search patrons - launch the search and verify the results are consistent with the values you have filled. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 35591 [details] [review] [PASSED QA] Bug 12944 [Patron lists follow-up] There is no way to search orders by creator This bug modifies not just the order search form but also the patron lists feature, making use of the new script for building a patron autocomplete form. However, the test plan does not specify that the patron lists form be tested as well, and it doesn't work. This patch corrects a minor flaw which broke the patron search autocomplete when adding patrons to a patron list. To test, create a new patron list if necessary. Click the "add patrons" button to add patrons to the list. In the patron search form type a partial patron name. You should get an autocomplete dropdown of existing patrons. Selecting one should work correctly. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 35592 [details] [review] [PASSED QA] Bug 12944: The autocomplete should only be applied for the form If it's the result view, the autocomplete should not be apply to the input element (it does not exist). Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 35593 [details] [review] [PASSED QA] Bug 12944: Fix regression on translating This patch fixes the translation for the "Remove" button. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Tested: - acq history search with different searches - patron lists patron search Passes all tests and QA script.
Created attachment 35698 [details] [review] Bug 12944: (QA followup) fix POD errors from koha-qa.pl Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Patches pushed to master. Thanks Jonathan!