Bug 37492

Summary: We should set datatable defaults for possible null returns
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: victor
Version: MainKeywords: Academy
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 36196    
Bug Blocks:    

Description Martin Renvoize (ashimema) 2024-07-26 13:17:57 UTC
As discussed on bug 36169 we're side stepping null values instead of using a proper default handler as suggested by Victor in comment 4 and comment 5.

We should use the defaultContent handler instead.
Comment 1 Victor Grousset/tuxayo 2024-07-26 19:31:34 UTC
(In reply to Victor Grousset/tuxayo from bug 36169 comment #4)
> This seem to be the proper way to handle null values:
> https://stackoverflow.com/questions/48917064/how-do-you-properly-handle-null-
> values-in-datatables/48920248#48920248
> Hopefully that works in our case.
> 
> From reading quickly:
> Adding «"defaultContent": ""»
> And maybe having to change our "targets" value if for some reason it only
> work with '_all' (and that we somehow can get away without [0,1,2,3,4])


(In reply to Victor Grousset/tuxayo from bug 36169 comment #5)
> Another source:
> https://stackoverflow.com/questions/57711349/how-to-deal-with-null-values-in-
> jquery-datatable-when-using-ajax/57714479#57714479
> 
> ---
> 
> And another.
> According to the usage of defaultContent there, we can even target
> individual columns for default values:
> https://datatables.net/forums/discussion/50823/handling-null-values
> 
> So it seems pretty sure we can use that.