Bug 26572 - Add autocomplete to librarian field in log viewer
Summary: Add autocomplete to librarian field in log viewer
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 26592
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-29 18:33 UTC by Owen Leonard
Modified: 2021-06-14 21:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Circulation function:


Attachments
Bug 26572: Add autocomplete to librarian field in log viewer (5.89 KB, patch)
2020-09-29 18:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26572: Add autocomplete to librarian field in log viewer (5.94 KB, patch)
2020-09-30 09:45 UTC, David Nind
Details | Diff | Splinter Review
Bug 26572: Add autocomplete to librarian field in log viewer (5.84 KB, patch)
2020-10-14 17:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26572: Add autocomplete to librarian field in log viewer (5.89 KB, patch)
2020-10-15 00:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26592: (QA follow-up) Escape strings in autocomplete (1.80 KB, patch)
2020-10-15 13:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26572: (QA follow-up) Escape strings in autocomplete (1.75 KB, patch)
2020-11-04 11:12 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (lukeg) 2020-11-16 21:31:22 UTC
enhancement will not be backported to 20.05.x