https://gitlab.com/koha-community/Koha/blob/8538886cb91f977d6109bfd035d4d8348ad108dc/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt#L126
Can you please add a test plan to explain where the problem is and how it looks like? :)
This is not a functional bug it's a mistake in the HTML where a label is not well linked to the input field. Well actually there a small functional symptom. 1. Go to a patron 2. Go to Fines 3. Go to Pay fines 4. Write off an individual fine line 5. URL should be "staff://cgi-bin/koha/members/paycollect.pl?borrowernumber=9999999&writeoff_individual=999999" 6. Click on "Writeoff amount:" 7. The field is not focused. This is the bug. Linking a label and the field allow to focus the field when clicking the label. It can be also used by accessibility tools. E.g. for a screen reader a blind keyboard to tell the name of the field.
Created attachment 84034 [details] [review] Bug 20527: Made the "Writeoff amount" input focus when the "Pay fines" tab loads.
Hi Ethan. This works for the Write off button. I think this should also be done for the other buttons as well - Pay, Pay amount, Pay selected, and Write off selected. I also noticed that for the row of buttons at the bottom (Pay, Pay amount, Pay selected, and Write off selected) when you press cancel on the individual screens that it takes you back to the Transactions tab, rather than Make a payment tab. This should probably be added as separate bug. Note that bug 18661 will fix the tab titles when you are in any of the payment and write off screens so that they stay as 'Transactions' and 'Make a payment' (currently they are labelled Account and Pay fines). I would also add an updated test plan to the bug as well (the QA team will probably ask for it!), for example: 1. Search for a patron (Patrons > Search > Select a patron) 2. Add an invoice for a patron (Accounting > Create manual invoice) 3. Before applying the patch click on any of the payment or write off buttons* (under Accounting > Make a payment) - you should notice that the tab focus is on the search patrons field at the top of the page, rather than the payment amount field 4. After applying the patch check that the tab focus for all of the payment or write off buttons* is on the payment amount field (and it should be outlined in a darker green) * Buttons for transaction line items: Pay, Write off; Buttons at the bottom: Pay, Pay amount, Pay selected, and Write off selected Setting the focus on the payment amount field allows staff to more quickly update the amount. It is also an accessibility issue, and fixing this makes navigating the pages easier for those using accessibility tools, such as screen readers. David
(In reply to David Nind from comment #4) > > I also noticed that for the row of buttons at the bottom (Pay, Pay amount, > Pay selected, and Write off selected) when you press cancel on the > individual screens that it takes you back to the Transactions tab, rather > than Make a payment tab. This should probably be added as separate bug. > This can be fixed at Bug 22148.
Created attachment 84100 [details] [review] Bug 20527: Significant inputs will be focused on in the "Accounting" section of a patron. Test Plan: 1. From the homepage, select Patrons. 2. Search for any patron and select any patron. 3. You should be seeing the patrons' details. On the left, select "Accounting". 4. Click on "Pay". 5. The "Collect from patron" field should be focused. This means you should not have to click on the input field to start typing, it should already be selected. Confirm that this works. 6. Click "Cancel" and you should be back to the "Make a payment" tab. 7. Click on "Write off". 8.The "Writeoff amount" field should be focused. Confirm that this works. 9. Click "Cancel" and you should be back to the "Make a payment" tab. 10. Click on "Pay amount". 11. The "Collect from patron" field should be focused. Confirm that this works. 12. Click "Pay fines" tab and you should be back to the "Make a payment" tab. 13. Click on "Pay selected". 14. Repeat steps 12 & 13. 15. Click on "Write off selected". 16. The "Writeoff amount" field should be focused. Confirm that this works. 17. Click "Pay fines" tab and you should be back to the "Make a payment" tab. 18. Click the "Create manual invoice". 19. The "Amount" field should be focused. Confirm that this works. 20. Click on "Create manual credit". 21. The "Amount" field should be focused. Confirm that this works.
Created attachment 84110 [details] [review] Bug 20527: Removing focus from payment note Did not mean to leave this in.
Created attachment 84130 [details] [review] Bug 20527: Significant inputs will be focused on in the "Accounting" section of a patron. Test Plan: 1. From the homepage, select Patrons. 2. Search for any patron and select any patron. 3. You should be seeing the patrons' details. On the left, select "Accounting". 4. Click on "Pay". 5. The "Collect from patron" field should be focused. This means you should not have to click on the input field to start typing, it should already be selected. Confirm that this works. 6. Click "Cancel" and you should be back to the "Make a payment" tab. 7. Click on "Write off". 8.The "Writeoff amount" field should be focused. Confirm that this works. 9. Click "Cancel" and you should be back to the "Make a payment" tab. 10. Click on "Pay amount". 11. The "Collect from patron" field should be focused. Confirm that this works. 12. Click "Pay fines" tab and you should be back to the "Make a payment" tab. 13. Click on "Pay selected". 14. Repeat steps 12 & 13. 15. Click on "Write off selected". 16. The "Writeoff amount" field should be focused. Confirm that this works. 17. Click "Pay fines" tab and you should be back to the "Make a payment" tab. 18. Click the "Create manual invoice". 19. The "Amount" field should be focused. Confirm that this works. 20. Click on "Create manual credit". 21. The "Amount" field should be focused. Confirm that this works. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 84131 [details] [review] Bug 20527: Removing focus from payment note Did not mean to leave this in. Signed-off-by: David Nind <david@davidnind.com>
I am not sure if this patch does fix the problem initially reported. Adding Owen in hope he might be able to shine some light.
The patch doesn't address what the bug reports. The patch adds auto-focus to some accounting form fields, but some of them don't make sense: Putting the focus on the payment field only makes sense if it's the first or only field in the form. Adding focus to the *last* input in the form seems counterproductive. The auto-focus changes to paycollect.tt could be re-implemented on a new bug report, but it's not right for this bug.
Created attachment 115494 [details] [review] Bug 20527: Corrected paid to amountwrittenoff Test Plan 1. Go to My account and go into accounting 2.Create manual invoice (If you already have invoices skip this step) 3.On the Make a payment tab click on Write off under actions of an invoice 4. Click on Writeoff amount label and make sure that the amount written is highlighted in green.
Created attachment 115536 [details] [review] Bug 20527: Corrected paid to amountwrittenoff Test Plan 1. Go to My account and go into accounting 2.Create manual invoice (If you already have invoices skip this step) 3.On the Make a payment tab click on Write off under actions of an invoice 4. Click on Writeoff amount label and make sure that the amount written is highlighted in green. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 115568 [details] [review] Bug 20527: Corrected paid to amountwrittenoff Test Plan 1. Go to My account and go into accounting 2.Create manual invoice (If you already have invoices skip this step) 3.On the Make a payment tab click on Write off under actions of an invoice 4. Click on Writeoff amount label and make sure that the amount written is highlighted in green. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 115570 [details] [review] Bug 20527: (QA follow-up) Fix type 'Wiriteoff' Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.03
Pushed to 20.05.x for 20.05.09
Backported: Pushed to 19.11.x branch for 19.11.15