Bug 12944 - Search for creator of an order
Summary: Search for creator of an order
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-17 15:17 UTC by Jonathan Druart
Modified: 2015-12-03 22:11 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 12944: Refactor the patron autocomplete (5.31 KB, patch)
2014-09-17 15:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12944: Search orders by basket creator (5.87 KB, patch)
2014-09-17 15:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12944: Refactor the patron autocomplete (5.51 KB, patch)
2014-09-23 09:25 UTC, Paola Rossi
Details | Diff | Splinter Review
Bug 12944: Search orders by basket creator (6.08 KB, patch)
2014-09-23 09:25 UTC, Paola Rossi
Details | Diff | Splinter Review
[PASSED QA] Bug 12944: Refactor the patron autocomplete (5.43 KB, patch)
2014-10-03 14:27 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 12944: Search orders by basket creator (5.99 KB, patch)
2014-10-03 14:27 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 12944 [QA Followup] - Rename patrons.pl to patrons.js (2.17 KB, patch)
2014-10-03 14:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 12944 [Patron lists follow-up] There is no way to search orders by creator (1.66 KB, patch)
2014-10-29 14:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 12944 [Patron lists follow-up] There is no way to search orders by creator (1.72 KB, patch)
2014-10-29 17:30 UTC, Paola Rossi
Details | Diff | Splinter Review
Bug 12944: Refactor the patron autocomplete (5.53 KB, patch)
2014-11-04 14:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12944: Search orders by basket creator (5.98 KB, patch)
2014-11-04 14:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12944 [Patron lists follow-up] There is no way to search orders by creator (2.37 KB, patch)
2014-11-04 14:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12944: The autocomplete should only be applied for the form (1.36 KB, patch)
2014-11-04 14:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12944: Fix regression on translating (2.62 KB, patch)
2014-12-29 10:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 12944: Refactor the patron autocomplete (5.63 KB, patch)
2015-01-28 21:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12944: Search orders by basket creator (6.05 KB, patch)
2015-01-28 21:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12944 [Patron lists follow-up] There is no way to search orders by creator (2.44 KB, patch)
2015-01-28 21:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12944: The autocomplete should only be applied for the form (1.43 KB, patch)
2015-01-28 21:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12944: Fix regression on translating (2.80 KB, patch)
2015-01-28 21:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 12944: (QA followup) fix POD errors from koha-qa.pl (1.17 KB, patch)
2015-02-06 13:59 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2014-09-17 15:17:26 UTC
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.
Comment 1 Jonathan Druart 2014-09-17 15:23:08 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-09-17 15:23:33 UTC Comment hidden (obsolete)
Comment 3 Paola Rossi 2014-09-23 09:25:13 UTC Comment hidden (obsolete)
Comment 4 Paola Rossi 2014-09-23 09:25:48 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2014-10-03 14:27:46 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2014-10-03 14:27:59 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2014-10-03 14:28:02 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2014-10-29 14:59:52 UTC Comment hidden (obsolete)
Comment 9 Paola Rossi 2014-10-29 17:30:56 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2014-10-30 00:52:31 UTC
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.
Comment 11 Paola Rossi 2014-10-30 12:49:10 UTC
NB. On patron list, there is a little redundancy in the removing patrons' options.
Comment 12 Jonathan Druart 2014-11-04 14:06:25 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2014-11-04 14:06:30 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2014-11-04 14:06:35 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2014-11-04 14:06:39 UTC Comment hidden (obsolete)
Comment 16 Jonathan Druart 2014-11-04 14:08:18 UTC
(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).
Comment 17 Jonathan Druart 2014-11-04 14:09:40 UTC
(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 18 Katrin Fischer 2014-12-27 18:56:35 UTC
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?
Comment 19 Jonathan Druart 2014-12-29 10:15:56 UTC Comment hidden (obsolete)
Comment 20 Katrin Fischer 2015-01-28 21:11:35 UTC
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>
Comment 21 Katrin Fischer 2015-01-28 21:11:40 UTC
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>
Comment 22 Katrin Fischer 2015-01-28 21:11:45 UTC
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>
Comment 23 Katrin Fischer 2015-01-28 21:11:55 UTC
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>
Comment 24 Katrin Fischer 2015-01-28 21:12:01 UTC
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.
Comment 25 Tomás Cohen Arazi 2015-02-06 13:59:44 UTC
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>
Comment 26 Tomás Cohen Arazi 2015-02-09 18:59:12 UTC
Patches pushed to master.

Thanks Jonathan!