Bug 29729 - If serials_stats.pl returns no results dataTables get angry
Summary: If serials_stats.pl returns no results dataTables get angry
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-17 21:06 UTC by Lucas Gass
Modified: 2022-12-12 21:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.02,21.05.08


Attachments
Bug 29729: Build a tr for each subscription (1.68 KB, patch)
2021-12-17 21:12 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29729: Build a tr for each subscription (1.74 KB, patch)
2021-12-17 21:29 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 29729: Build a tr for each subscription (1.80 KB, patch)
2021-12-18 21:53 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2021-12-17 21:06:42 UTC
To recreate:

To to Reports > Serials > Serials subscriptions and run the report while selecting a branch without subscriptions. 
Notice that console error:

datatables.min_21.1200002.js:62 Uncaught TypeError: Cannot set properties of undefined (setting '_DT_CellIndex')

If you run the report for a branch WITH subscriptions it works just fine.
Comment 1 Lucas Gass 2021-12-17 21:12:32 UTC
Created attachment 128686 [details] [review]
Bug 29729: Build a tr for each subscription

To test:
1 To to Reports > Serials > Serials subscriptions and run the report while selecting a branch without subscriptions.
2 Notice console error
3 If you run the report for a branch WITH subscriptions it works just fine.
4 Apply patch
5 Do 1 again, no console error and show no see 'No entries to show'
6 Make sure it also works when you have a few subscriptions for a branch as well
Comment 2 Andrew Fuerste-Henry 2021-12-17 21:29:07 UTC
Created attachment 128687 [details] [review]
Bug 29729: Build a tr for each subscription

To test:
1 To to Reports > Serials > Serials subscriptions and run the report while selecting a branch without subscriptions.
2 Notice console error
3 If you run the report for a branch WITH subscriptions it works just fine.
4 Apply patch
5 Do 1 again, no console error and show no see 'No entries to show'
6 Make sure it also works when you have a few subscriptions for a branch as well

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 Katrin Fischer 2021-12-18 21:53:31 UTC
Created attachment 128699 [details] [review]
Bug 29729: Build a tr for each subscription

To test:
1 To to Reports > Serials > Serials subscriptions and run the report while selecting a branch without subscriptions.
2 Notice console error
3 If you run the report for a branch WITH subscriptions it works just fine.
4 Apply patch
5 Do 1 again, no console error and show no see 'No entries to show'
6 Make sure it also works when you have a few subscriptions for a branch as well

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2021-12-18 21:53:56 UTC
Nice catch :)
Comment 5 Fridolin Somers 2022-01-04 06:59:46 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 6 Kyle M Hall 2022-01-07 11:17:22 UTC
Pushed to 21.11.x for 21.11.02
Comment 7 Andrew Fuerste-Henry 2022-01-10 15:52:52 UTC
Pushed to 21.05.x for 21.05.08
Comment 8 Victor Grousset/tuxayo 2022-02-07 11:51:25 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.