Aims to make it possible to sort reports by a custom secondary column as described in #12127
This is only a prove of concept atm.
If we decide to use it that way I'd go on with adding some tests for it...
this looks good to me :+1: We could later also make this available as a global API parameter filter.
Added some unit tests