Admin|Templates - sort by Type

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

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:

  • DocumentTemplateQuery (to sort in memory)
  • DocumentTemplateModel  (to indicate that the Type column is sortable)

For an example where this is already done, see:

  • CustomerAlertQuery
  • CustomerAlertTableModel

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

Syndicate content