Summary: | Article requests: some DataTables functionality is broken | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Circulation | Assignee: | Owen Leonard <oleonard> |
Status: | Pushed to main --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, gmcharlt, kyle.m.hall, m.de.rooy, nugged |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes JavaScript errors in the staff interface article requests table. The tables weren't refreshing, and the tab numbers weren't updating, when selecting an action for individual or multiple requests (such as 'Set request as pending').
|
|
Version(s) released in: |
25.11.00
|
Circulation function: | Article requests |
Attachments: |
Bug 40107: Article requests: Some DataTables functionality is broken
Bug 40107: Article requests: Some DataTables functionality is broken Bug 40107: Article requests: Some DataTables functionality is broken |
Description
Owen Leonard
2025-06-10 11:46:56 UTC
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 |