Bug 39513

Summary: Correct OPAC subscription tables DataTable initialization
Product: Koha Reporter: Laura Escamilla <Laura.escamilla>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: Pushed to main --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: oleonard
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35202
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 26553    
Bug Blocks:    
Attachments: Bug 39513: Correct OPAC subscription tables DataTable initialization
Bug 39513: Correct OPAC subscription tables DataTable initialization
Bug 39513: Correct OPAC subscription tables DataTable initialization

Description Laura Escamilla 2025-04-01 13:30:57 UTC
Having searchable data tables on multiple tables within the same page can be overwhelming and confusing for users. It lacks clarity and intuitiveness, making it difficult to efficiently navigate and find the desired information. A more streamlined and user-friendly approach would improve the overall experience.

To test:
1. Create a new serial subscription /cgi-bin/koha/serials/serials-home.pl
2. Receive items for the subscription
3. Create a second serial subscription for the same item, but limit this one to only one library branch. Receive items for this subscription as well. 
4. Go to the OPAC and view the item that has two subscriptions attached to it. 
5. At first glance the subscription panel looks good. Both tables are visible including the received items. 
6. Click on another panel (Holdings, Title notes, Comments, etc). Then click back to the Subscriptions panel again. Searchable datatable features, and pagination now shows for both tables. Currently this is not user friendly and duplicates as well. I propose removing the sortable datatable features.
Comment 1 Owen Leonard 2025-04-01 14:35:45 UTC
Created attachment 180205 [details] [review]
Bug 39513: Correct OPAC subscription tables DataTable initialization

This patch corrects an error in the OPAC subscription tables DataTable
initialization which arose from merging of Bug 36553. The table should
be initialized by class (see Bug 35202).

To test you should have a bibliographic record with multiple
subscriptions and items attached to each.

- In the OPAC, view the detail page for that bibliographic record.
- View the Subscriptions tab. All subscription tables should be
  sortable DataTables which follow the configuration set in staff client
  Administration -> Table settings -> OPAC -> subscriptionst.
- Click another tab, e.g. Holdings.
- Click back to the Subscriptions tab. The tables should remain the
  same: Sortable tables with no other DataTables controls.

Sponsored-by: Athens County Public Libraries
Comment 2 Laura Escamilla 2025-04-01 14:44:12 UTC
Created attachment 180207 [details] [review]
Bug 39513: Correct OPAC subscription tables DataTable initialization

This patch corrects an error in the OPAC subscription tables DataTable
initialization which arose from merging of Bug 36553. The table should
be initialized by class (see Bug 35202).

To test you should have a bibliographic record with multiple
subscriptions and items attached to each.

- In the OPAC, view the detail page for that bibliographic record.
- View the Subscriptions tab. All subscription tables should be
  sortable DataTables which follow the configuration set in staff client
  Administration -> Table settings -> OPAC -> subscriptionst.
- Click another tab, e.g. Holdings.
- Click back to the Subscriptions tab. The tables should remain the
  same: Sortable tables with no other DataTables controls.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 3 Jonathan Druart 2025-04-02 07:19:37 UTC
Created attachment 180235 [details] [review]
Bug 39513: Correct OPAC subscription tables DataTable initialization

This patch corrects an error in the OPAC subscription tables DataTable
initialization which arose from merging of Bug 36553. The table should
be initialized by class (see Bug 35202).

To test you should have a bibliographic record with multiple
subscriptions and items attached to each.

- In the OPAC, view the detail page for that bibliographic record.
- View the Subscriptions tab. All subscription tables should be
  sortable DataTables which follow the configuration set in staff client
  Administration -> Table settings -> OPAC -> subscriptionst.
- Click another tab, e.g. Holdings.
- Click back to the Subscriptions tab. The tables should remain the
  same: Sortable tables with no other DataTables controls.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Katrin Fischer 2025-04-11 07:56:33 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 5 Katrin Fischer 2025-04-16 12:21:12 UTC
Is it possible that this is broken in 22.11 too? We see broken datatables navigation and no data when there is more than one subscription.