Bug 34083

Summary: Patron auto-complete fails if organization patron full name is in a single field separated by a space
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: PatronsAssignee: Pedro Amorim <pedro.amorim>
Status: RESOLVED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: minor    
Priority: P5 - low CC: gmcharlt, jonathan.druart, jonathan.field, kyle.m.hall, martin.renvoize, nick, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.02,22.11.08
Circulation function:
Bug Depends on: 33117    
Bug Blocks: 34094    
Attachments: Bug 34083: Add searching for full term on patron auto-complete
Bug 34083: Add searching for full term on patron auto-complete
Bug 34083: (follow-up) Prevent showing 'null'
Bug 34083: Add searching for full term on patron auto-complete
Bug 34083: (follow-up) Prevent showing 'null'
Bug 34083: Add searching for full term on patron auto-complete
Bug 34083: (follow-up) Prevent showing 'null'

Description Pedro Amorim 2023-06-21 16:08:08 UTC

    
Comment 1 Pedro Amorim 2023-06-21 16:10:45 UTC
Created attachment 152532 [details] [review]
Bug 34083: Add searching for full term on patron auto-complete

To reproduce, on k-t-d:
1) Create a new patron of category 'School'
2) Enter 'Middle school high school' on the mandatory 'Name' field and put something in 'Card number:'
3) Visit patron lists at /cgi-bin/koha/patron_lists/lists.pl and click 'New patron list'
4) Put something in 'Name:' and click 'Save'
5) On the 'Patron search' input, enter 'middle school high school' slowly and observe the auto-complete behaviour
6) Notice how after you start typing the second word, the auto complete results vanish.
7) Apply patch, repeat plan and verify it now works as expected.
Comment 2 Sam Lau 2023-06-21 17:22:12 UTC
Created attachment 152534 [details] [review]
Bug 34083: Add searching for full term on patron auto-complete

To reproduce, on k-t-d:
1) Create a new patron of category 'School'
2) Enter 'Middle school high school' on the mandatory 'Name' field and put something in 'Card number:'
3) Visit patron lists at /cgi-bin/koha/patron_lists/lists.pl and click 'New patron list'
4) Put something in 'Name:' and click 'Save'
5) On the 'Patron search' input, enter 'middle school high school' slowly and observe the auto-complete behaviour
6) Notice how after you start typing the second word, the auto complete results vanish.
7) Apply patch, repeat plan and verify it now works as expected.

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 3 Pedro Amorim 2023-06-22 08:59:01 UTC
Created attachment 152544 [details] [review]
Bug 34083: (follow-up) Prevent showing 'null'

In patron lists, if the patron added is an organization without the firstname, it presents 'null'. This fixes that
Comment 4 Pedro Amorim 2023-06-22 12:23:45 UTC
Created attachment 152559 [details] [review]
Bug 34083: Add searching for full term on patron auto-complete

To reproduce, on k-t-d:
1) Create a new patron of category 'School'
2) Enter 'Middle school high school' on the mandatory 'Name' field and put something in 'Card number:'
3) Visit patron lists at /cgi-bin/koha/patron_lists/lists.pl and click 'New patron list'
4) Put something in 'Name:' and click 'Save'
5) On the 'Patron search' input, enter 'middle school high school' slowly and observe the auto-complete behaviour
6) Notice how after you start typing the second word, the auto complete results vanish.
7) Apply patch, repeat plan and verify it now works as expected.

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 5 Pedro Amorim 2023-06-22 12:23:48 UTC
Created attachment 152560 [details] [review]
Bug 34083: (follow-up) Prevent showing 'null'

In patron lists, if the patron added is an organization without the firstname, it presents 'null'. This fixes that
Comment 6 Pedro Amorim 2023-06-22 12:24:15 UTC
Rebased this on top of bug 33117
Comment 7 Katrin Fischer 2023-06-22 20:41:41 UTC
Created attachment 152593 [details] [review]
Bug 34083: Add searching for full term on patron auto-complete

To reproduce, on k-t-d:
1) Create a new patron of category 'School'
2) Enter 'Middle school high school' on the mandatory 'Name' field and put something in 'Card number:'
3) Visit patron lists at /cgi-bin/koha/patron_lists/lists.pl and click 'New patron list'
4) Put something in 'Name:' and click 'Save'
5) On the 'Patron search' input, enter 'middle school high school' slowly and observe the auto-complete behaviour
6) Notice how after you start typing the second word, the auto complete results vanish.
7) Apply patch, repeat plan and verify it now works as expected.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2023-06-22 20:41:45 UTC
Created attachment 152594 [details] [review]
Bug 34083: (follow-up) Prevent showing 'null'

In patron lists, if the patron added is an organization without the firstname, it presents 'null'. This fixes that

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Tomás Cohen Arazi (tcohen) 2023-06-23 14:04:04 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 10 Martin Renvoize (ashimema) 2023-07-17 14:36:03 UTC
Thanks for all the hard work!

Pushed to 23.05.x for the next release
Comment 11 Pedro Amorim 2023-07-18 11:55:24 UTC
Nice work everyone!

Pushed to 22.11.x for next release