Bug 30499

Summary: Keyboard shortcuts broken on several pages
Product: Koha Reporter: Emmi Takkinen <emmi.takkinen>
Component: Staff interfaceAssignee: Tim McMahon <tmcmahon>
Status: CLOSED FIXED QA Contact: Joonas Kylmälä <joonas.kylmala>
Severity: trivial    
Priority: P5 - low CC: andrew, gmcharlt, joonas.kylmala, lucas, tmcmahon, victor, wizzyrea
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00,22.05.06,21.11.12
Circulation function:
Attachments: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts
Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts
Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts
Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts
Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts

Description Emmi Takkinen 2022-04-08 12:13:04 UTC
Keyboard shortcuts fro catalog search, check in and renew should be following: 
1) Alt-q for catalog search
2) Alt-r for check in
3) Alt-w for renew

However on some of the pages shortcuts get mixed up:

1) Alt-w for catalog search
2) Alt-q for check in
3) Alt-r for renew

Problem occurs at least on the following pages:

circulation-home.pl
circulation.pl
renew.pl
set-library.pl
Comment 1 Tim McMahon 2022-07-28 16:52:33 UTC
Created attachment 138208 [details] [review]
Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts

Bug 30499: Keyboard shortcuts broken on several pages

Keyboard shortcuts for catalog search, check in and renew should be following: 
1) Alt-q for catalog search
2) Alt-r for check in
3) Alt-w for renew

However on some of the pages shortcuts get mixed up:

1) Alt-w for catalog search
2) Alt-q for check in
3) Alt-r for renew

Affected files are:
circ/pendingreserves.tt
circ/circulation_batch_checkouts.tt
circ/circulation-home.tt
circ/branchtransfers.tt
circ/branchoverdues.tt
circ/set-library.tt
circ/checkout-notes.tt
circ/renew.tt
circ/waitingreserves.tt
circ/transferstoreceive.tt
circ/offline.tt
circ/bookcount.tt
circ/on-site_checkouts.tt
circ/circulation.tt
circ/transfers_to_send.tt
circ/request-article.tt
circ/overdue.tt
circ/reserveratios.tt
offline_circ/list.tt
offline_circ/process_koc.tt
offline_circ/enqueue_koc.tt
plugins/plugins-upload.tt
plugins/plugins-disabled.tt
pos/registers.tt
pos/register.tt
pos/pay.tt
reports/reports-home.tt
reports/dictionary.tt
reports/guided_reports_start.tt
reserve/request.tt
tools/scheduler.tt

This is because the include statement for catalogue-search-box.inc is in the wrong line in circ-search.inc.

To test:
1) Go to an affected page (circulation-home was the first one I noticed)
2) Try the keyboard shortcuts and notice they are incorrect
3) Apply patch and refresh the page
4) Notice that the keys work properly
Comment 2 Emmi Takkinen 2022-07-29 05:38:16 UTC
I'm having trouble applying this patch. Using git bz I get:

Traceback (most recent call last):
  File "/usr/local/bin/git-bz", line 2716, in <module>
    applied = do_apply(bug_ref)
  File "/usr/local/bin/git-bz", line 1827, in do_apply
    users = bug.server.get_xmlrpc_proxy().User.get({ 'names': [patch.attacher] })['users']
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1331, in single_request
    response.msg,
xmlrpclib.ProtocolError: <ProtocolError for bugs.koha-community.org/xmlrpc.cgi: 404 Not Found>

Applying manually doesn't work either:

>Patch format detection failed.

It seems patch is missing metadata header (stuff containing e.g. information when patch was made and by whom) from the begining of it. Could you provide patch again?
Comment 5 Liz Rea 2022-07-29 18:36:01 UTC
Created attachment 138374 [details] [review]
Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts

Keyboard shortcuts for catalog search, check in and renew should be following:
1) Alt-q for catalog search
2) Alt-r for check in
3) Alt-w for renew

However on some of the pages shortcuts get mixed up:

1) Alt-w for catalog search
2) Alt-q for check in
3) Alt-r for renew

Affected files are:
circ/pendingreserves.tt
circ/circulation_batch_checkouts.tt
circ/circulation-home.tt
circ/branchtransfers.tt
circ/branchoverdues.tt
circ/set-library.tt
circ/checkout-notes.tt
circ/renew.tt
circ/waitingreserves.tt
circ/transferstoreceive.tt
circ/offline.tt
circ/bookcount.tt
circ/on-site_checkouts.tt
circ/circulation.tt
circ/transfers_to_send.tt
circ/request-article.tt
circ/overdue.tt
circ/reserveratios.tt
offline_circ/list.tt
offline_circ/process_koc.tt
offline_circ/enqueue_koc.tt
plugins/plugins-upload.tt
plugins/plugins-disabled.tt
pos/registers.tt
pos/register.tt
pos/pay.tt
reports/reports-home.tt
reports/dictionary.tt
reports/guided_reports_start.tt
reserve/request.tt
tools/scheduler.tt

This is because the include statement for catalogue-search-box.inc is in the wrong line in circ-search.inc.

To test:
1) Go to an affected page (circulation-home was the first one I noticed)
2) Try the keyboard shortcuts and notice they are incorrect
3) Apply patch and refresh the page
4) Notice that the keys work properly
Comment 6 Andrew Fuerste-Henry 2022-07-29 20:26:54 UTC
I got the following error trying to apply this to a sandbox. I'm wondering if maybe it's to do with two copies of the same patch being active here? I just marked one obsolete to see if that helps, waiting on a new sandbox.

Bug 30499 - Keyboard shortcuts broken on several pages

138208 - Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts
138374 - Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts

Apply? [(y)es, (n)o, (i)nteractive] Traceback (most recent call last):
  File "/usr/bin/git-bz", line 2716, in <module>
    applied = do_apply(bug_ref)
  File "/usr/bin/git-bz", line 1827, in do_apply
    users = bug.server.get_xmlrpc_proxy().User.get({ 'names': [patch.attacher] })['users']
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1331, in single_request
    response.msg,
xmlrpclib.ProtocolError: <ProtocolError for bugs.koha-community.org/xmlrpc.cgi: 404 Not Found>
Comment 7 ByWater Sandboxes 2022-07-29 20:37:41 UTC
Created attachment 138376 [details] [review]
Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts

Keyboard shortcuts for catalog search, check in and renew should be following:
1) Alt-q for catalog search
2) Alt-r for check in
3) Alt-w for renew

However on some of the pages shortcuts get mixed up:

1) Alt-w for catalog search
2) Alt-q for check in
3) Alt-r for renew

Affected files are:
circ/pendingreserves.tt
circ/circulation_batch_checkouts.tt
circ/circulation-home.tt
circ/branchtransfers.tt
circ/branchoverdues.tt
circ/set-library.tt
circ/checkout-notes.tt
circ/renew.tt
circ/waitingreserves.tt
circ/transferstoreceive.tt
circ/offline.tt
circ/bookcount.tt
circ/on-site_checkouts.tt
circ/circulation.tt
circ/transfers_to_send.tt
circ/request-article.tt
circ/overdue.tt
circ/reserveratios.tt
offline_circ/list.tt
offline_circ/process_koc.tt
offline_circ/enqueue_koc.tt
plugins/plugins-upload.tt
plugins/plugins-disabled.tt
pos/registers.tt
pos/register.tt
pos/pay.tt
reports/reports-home.tt
reports/dictionary.tt
reports/guided_reports_start.tt
reserve/request.tt
tools/scheduler.tt

This is because the include statement for catalogue-search-box.inc is in the wrong line in circ-search.inc.

To test:
1) Go to an affected page (circulation-home was the first one I noticed)
2) Try the keyboard shortcuts and notice they are incorrect
3) Apply patch and refresh the page
4) Notice that the keys work properly

Signed-off-by: Andrew <andrewfh@dubcolib.org>
Comment 8 Joonas Kylmälä 2022-07-30 16:33:29 UTC
Created attachment 138389 [details] [review]
Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts

Keyboard shortcuts for catalog search, check in and renew should be following:
1) Alt-q for catalog search
2) Alt-r for check in
3) Alt-w for renew

However on some of the pages shortcuts get mixed up:

1) Alt-w for catalog search
2) Alt-q for check in
3) Alt-r for renew

Affected files are:
circ/pendingreserves.tt
circ/circulation_batch_checkouts.tt
circ/circulation-home.tt
circ/branchtransfers.tt
circ/branchoverdues.tt
circ/set-library.tt
circ/checkout-notes.tt
circ/renew.tt
circ/waitingreserves.tt
circ/transferstoreceive.tt
circ/offline.tt
circ/bookcount.tt
circ/on-site_checkouts.tt
circ/circulation.tt
circ/transfers_to_send.tt
circ/request-article.tt
circ/overdue.tt
circ/reserveratios.tt
offline_circ/list.tt
offline_circ/process_koc.tt
offline_circ/enqueue_koc.tt
plugins/plugins-upload.tt
plugins/plugins-disabled.tt
pos/registers.tt
pos/register.tt
pos/pay.tt
reports/reports-home.tt
reports/dictionary.tt
reports/guided_reports_start.tt
reserve/request.tt
tools/scheduler.tt

This is because the include statement for catalogue-search-box.inc is in the wrong line in circ-search.inc.

To test:
1) Go to an affected page (circulation-home was the first one I noticed)
2) Try the keyboard shortcuts and notice they are incorrect
3) Apply patch and refresh the page
4) Notice that the keys work properly

Signed-off-by: Andrew <andrewfh@dubcolib.org>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 9 Tomás Cohen Arazi (tcohen) 2022-08-01 12:11:06 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 10 Tim McMahon 2022-08-05 19:59:47 UTC
Will this be added to 21.11?
Comment 11 Lucas Gass (lukeg) 2022-09-29 15:15:07 UTC
Backported to 22.05.x for 22.05.06
Comment 12 Victor Grousset/tuxayo 2022-10-13 15:56:04 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document it seems, marking resolved.
Comment 13 Arthur Suzuki 2022-10-22 22:08:03 UTC
Thanks!

Pushed to 21.11 for 21.11.12