When there are more than 20 checkout notes in the system, Koha fails to attach actions to the Seen/Not Seen buttons for checkout notes that are not on the first page of notes at cgi-bin/koha/circ/checkout-notes.pl. To Test: - create 21 checkout notes - go to cgi-bin/koha/circ/checkout-notes.pl - inspect the Seen/Not Seen buttons on the 21st note, see that there is no event attached I also filed bug 24335 while looking at this. I don't think it's related, but mentioning it just in case.
I think the patch for Bug 24335 fixes this. However, there remains the ambiguity about whether or not those batch operations will affect checked items which are not on the current "page" of the table. For instance: - I check all items on the first page - I navigate to the next page - I check all the items on the second page - I click the "Mark seen" button Result: Only the checked items on the second page are marked seen. One possible solution: A prompt asking the user whether they want to finish what they're doing before switching pages in the table. I bring this up in case this bug should be repurposed to address that issue.
I tried this while signing off on 24335. The Seen/Not Seen buttons on the second page still didn't work for me.
Created attachment 96801 [details] [review] Bug 24337: Checkout note cannot be marked seen if more than 20 exist This patch modifies the event handler on the individual "Mark seen" / "Mark unseen" buttons in the table of checkout notes. For an event to be successfully attached to a hidden element it must be given a context. To test you should have multiple checkout notes to work with, both seen and unseen. Apply the patch and go to "Checkout notes pending" from the staff client home page. - Navigate to the second "page" of data in the DataTable. - Test the functionality of the "Mark seen" and "Mark unseen" buttons. They should work correctly.
(In reply to Andrew Fuerste-Henry from comment #2) > The Seen/Not Seen buttons on the second page still didn't work for me. Thanks Andrew, I misunderstood. Hopefully this patch works for you.
Created attachment 96802 [details] [review] Bug 24337: Checkout note cannot be marked seen if more than 20 exist This patch modifies the event handler on the individual "Mark seen" / "Mark unseen" buttons in the table of checkout notes. For an event to be successfully attached to a hidden element it must be given a context. To test you should have multiple checkout notes to work with, both seen and unseen. Apply the patch and go to "Checkout notes pending" from the staff client home page. - Navigate to the second "page" of data in the DataTable. - Test the functionality of the "Mark seen" and "Mark unseen" buttons. They should work correctly. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
In retrospect, I didn't describe it well. Signing off. Thanks!
Created attachment 97173 [details] [review] Bug 24337: Checkout note cannot be marked seen if more than 20 exist This patch modifies the event handler on the individual "Mark seen" / "Mark unseen" buttons in the table of checkout notes. For an event to be successfully attached to a hidden element it must be given a context. To test you should have multiple checkout notes to work with, both seen and unseen. Apply the patch and go to "Checkout notes pending" from the staff client home page. - Navigate to the second "page" of data in the DataTable. - Test the functionality of the "Mark seen" and "Mark unseen" buttons. They should work correctly. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.x branch for 19.11.02
backported to 19.05.x for 19.05.07