Bug 26572

Summary: Add autocomplete to librarian field in log viewer
Product: Koha Reporter: Owen Leonard <oleonard>
Component: ToolsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, lucas
Version: master   
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:
20.11.00
Bug Depends on: 26592    
Bug Blocks:    
Attachments: Bug 26572: Add autocomplete to librarian field in log viewer
Bug 26572: Add autocomplete to librarian field in log viewer
Bug 26572: Add autocomplete to librarian field in log viewer
Bug 26572: Add autocomplete to librarian field in log viewer
Bug 26592: (QA follow-up) Escape strings in autocomplete
Bug 26572: (QA follow-up) Escape strings in autocomplete

Description Owen Leonard 2020-09-29 18:33:03 UTC
If you want to search the log with a limit on the librarian, the form expects a borrowernumber. Having autocomplete on the field would enable the user to fill the field without knowing the borrowernumber beforehand.
Comment 1 Owen Leonard 2020-09-29 18:42:20 UTC
Created attachment 110938 [details] [review]
Bug 26572: Add autocomplete to librarian field in log viewer

This patch adds patron autocomplete to the librarian field in the log
viewer search form.

Also changed: Some HTML markup errors in the template have been
corrected: Labels with invalid corresponding ids or with no valid id.

To test, apply the patch and go to Tools -> Log Viewer.

Type a name or cardnumber into the "Librarian" form field. This should
trigger an autocomplete dropdown.

Select a patron and confirm that the field is populated with the correct
borrowernumber.
Comment 2 David Nind 2020-09-30 09:45:20 UTC
Created attachment 110977 [details] [review]
Bug 26572: Add autocomplete to librarian field in log viewer

This patch adds patron autocomplete to the librarian field in the log
viewer search form.

Also changed: Some HTML markup errors in the template have been
corrected: Labels with invalid corresponding ids or with no valid id.

To test, apply the patch and go to Tools -> Log Viewer.

Type a name or cardnumber into the "Librarian" form field. This should
trigger an autocomplete dropdown.

Select a patron and confirm that the field is populated with the correct
borrowernumber.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2020-10-11 13:14:31 UTC
Patch no longer applies cleanly, please rebase!


Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 26572: Add autocomplete to librarian field in log viewer
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
M	koha-tmpl/intranet-tmpl/prog/js/viewlog.js
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/js/viewlog.js
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/js/viewlog.js
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
error: Failed to merge in the changes.
Patch failed at 0001 Bug 26572: Add autocomplete to librarian field in log viewer
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Comment 4 Owen Leonard 2020-10-14 17:19:31 UTC
Created attachment 111637 [details] [review]
Bug 26572: Add autocomplete to librarian field in log viewer

This patch adds patron autocomplete to the librarian field in the log
viewer search form.

Also changed: Some HTML markup errors in the template have been
corrected: Labels with invalid corresponding ids or with no valid id.

To test, apply the patch and go to Tools -> Log Viewer.

Type a name or cardnumber into the "Librarian" form field. This should
trigger an autocomplete dropdown.

Select a patron and confirm that the field is populated with the correct
borrowernumber.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2020-10-15 00:11:02 UTC
Created attachment 111664 [details] [review]
Bug 26572: Add autocomplete to librarian field in log viewer

This patch adds patron autocomplete to the librarian field in the log
viewer search form.

Also changed: Some HTML markup errors in the template have been
corrected: Labels with invalid corresponding ids or with no valid id.

To test, apply the patch and go to Tools -> Log Viewer.

Type a name or cardnumber into the "Librarian" form field. This should
trigger an autocomplete dropdown.

Select a patron and confirm that the field is populated with the correct
borrowernumber.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2020-10-15 09:27:25 UTC
Please rebase on top of bug 26592.
Comment 7 Owen Leonard 2020-10-15 13:37:39 UTC
Created attachment 111736 [details] [review]
Bug 26592: (QA follow-up) Escape strings in autocomplete

This patch updates the construction of the autocomplete dropdown so that
values are escaped.
Comment 8 Jonathan Druart 2020-11-04 11:12:39 UTC
Created attachment 112984 [details] [review]
Bug 26572: (QA follow-up) Escape strings in autocomplete

This patch updates the construction of the autocomplete dropdown so that
values are escaped.
Comment 9 Jonathan Druart 2020-11-04 12:03:49 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 10 Lucas Gass 2020-11-16 21:31:22 UTC
enhancement will not be backported to 20.05.x