When you change the status of an article request using the "Actions" menu, the affect row should be removed and the table redrawn. Instead there is an error in the console: Uncaught (in promise) TypeError: requested_datatable.rows is not a function UpdateTabCounts http://127.0.0.1:8081/cgi-bin/koha/circ/article-requests.pl?branchcode=:11710 SetPending http://127.0.0.1:8081/cgi-bin/koha/circ/article-requests.pl?branchcode=:11696
Created attachment 183174 [details] [review] Bug 40107: Article requests: Some DataTables functionality is broken Bug 38255 standardized our DataTables using kohaTable. kohaTable returns the affected table as a jQuery object, but JavaScript on the article requests page in the staff client expects a DataTable object. This patch updates the template accordingly. To test, apply the patch and enable the ArticleRequests system preference if necessary. - Log in to the OPAC and place several article requests. - In the staff interface, go to Circulation -> Article requests. - From the list of new article requests, test the menu options under "Actions." - Changing the status of a request should make it disappear from the "New" tab and appear under the tab for the new status (or it should be removed, in case of cancel or complete). - Test the same processes under the "Pending" and "Processing" tabs. - Each time you perform one of these tasks the counters on each tab should be updated correctly. Sponsored-by: Athens County Public Libraries
.kohaTable() is jquery object? ... .kohaTable().DataTable(); then?
(In reply to Andrii Nugged from comment #2) > ... .kohaTable().DataTable(); > > then? In this case both the jQuery object and the DataTables object are used.
Created attachment 183251 [details] [review] Bug 40107: Article requests: Some DataTables functionality is broken Bug 38255 standardized our DataTables using kohaTable. kohaTable returns the affected table as a jQuery object, but JavaScript on the article requests page in the staff client expects a DataTable object. This patch updates the template accordingly. To test, apply the patch and enable the ArticleRequests system preference if necessary. - Log in to the OPAC and place several article requests. - In the staff interface, go to Circulation -> Article requests. - From the list of new article requests, test the menu options under "Actions." - Changing the status of a request should make it disappear from the "New" tab and appear under the tab for the new status (or it should be removed, in case of cancel or complete). - Test the same processes under the "Pending" and "Processing" tabs. - Each time you perform one of these tasks the counters on each tab should be updated correctly. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com>
(In reply to Owen Leonard from comment #3) > In this case both the jQuery object and the DataTables object are used. thanks, clear. (In reply to David Nind from comment #4) > Created attachment 183251 [details] [review] [review] > Bug 40107: Article requests: Some DataTables functionality is broken > ... Taking this to our productions on 25.05, let's see what they say on Monday, if issue is gone.
Created attachment 183459 [details] [review] Bug 40107: Article requests: Some DataTables functionality is broken Bug 38255 standardized our DataTables using kohaTable. kohaTable returns the affected table as a jQuery object, but JavaScript on the article requests page in the staff client expects a DataTable object. This patch updates the template accordingly. To test, apply the patch and enable the ArticleRequests system preference if necessary. - Log in to the OPAC and place several article requests. - In the staff interface, go to Circulation -> Article requests. - From the list of new article requests, test the menu options under "Actions." - Changing the status of a request should make it disappear from the "New" tab and appear under the tab for the new status (or it should be removed, in case of cancel or complete). - Test the same processes under the "Pending" and "Processing" tabs. - Each time you perform one of these tasks the counters on each tab should be updated correctly. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to main for 25.11