Admin|Templates - sort by Type
Submitted by Guest on Tue, 08/07/2014 - 05:34
As part of the cleanup of the template load facility, I want to be able to check what types of templates are in the system. This would be a piece of cake if one could sort the Admin|Templates display by Type (ie archetype), but this is not currently a sortable column.
Is it easy to make this a sortable column?
Note that there are potential traps in having multiple templates of the same type in the system - if there are say 3 customer invoices, then you had better have your practice and/or practice locations set to select the desired template.
Regards, Tim G
Re: Admin|Templates - sort by Type
It can be made sortable, but all matching results would need to be pulled into memory first and then sorted.
This is due to a limitation in the database layer that doesn't support sorting on details nodes (the Type node maps to /details/archetype in entity.documentTemplate).
The classes that would need to be changed include:
For an example where this is already done, see:
Re: Admin|Templates - sort by Type
Tim - if it is not a trivial change, there are more important things to do. I can build a query. It is a facility that is needed only once in a blue moon (when you are rebuilding the template load system ;-) Regards, Tim G
Re: Admin|Templates - sort by Type
Raised as https://openvpms.atlassian.net/browse/OVPMS-1497