Jump to content

Identifying Email Templates that are not used


samwoo

Recommended Posts

Hello,

I was wondering if someone can guide me in find out what Email Templates we are not using (the ones that are set up in the Admin Tool).

There were LOADs of templates set up before I started to take on Hornbill, and now we need to do a mass tidy up,  I was just wondering if there was an easy way to identify what is currently being used againsts the services, settings etc. and list all the ones that are not being used.

Thanks,

Samuel

Link to comment
Share on other sites

Guest Ehsan

Hi @samwoo,

Hope you're well.

Through the Templates view, items that are highlighted in the list would have been created manually and items that are not highlighted in the list would have been provided OOTB with the Service Manager App. In the following example, RequestMessage was created manually. I would discourage you from deleting OOTB Templates as they will be in use and they are created automatically on update to the Service Manager App.

Screen Shot 2017-08-07 at 12.18.36.png

Templates can belong to different entities (e.g. Requests) and the configuration for each Template is stored in a XML file, so I'm not entirely sure what is the easiest way to report on all Templates, that are in use. Although, I do have an alternative :)

A Template could be in use by Business Processes or set against Application Settings.

To find out if a Template (e.g. RequestMessage in my example) is in use within a Business Process, you can create a Report to report on the following:

  • SELECT distinct(h_name) FROM h_bpm_processes WHERE h_xml LIKE '%RequestMessage%'

To find out if a Template (e.g. RequestMessage in my example) is set against an Application Setting or a User Setting, you can create a Reports to report on the following:

  • SELECT h_key FROM h_sys_app_settings WHERE h_value LIKE '%RequestMessage%'
  • SELECT h_key, h_user_id FROM h_sys_app_user_settings WHERE h_value LIKE '%RequestMessage%'

You could ofcourse replace LIKE with an IN clause - to include a list of all manually created Templates. :)

Sorry if this isn't much of a help! :(

Thanks,

Ehsan

Link to comment
Share on other sites

Guest Ehsan

@samwoo,

I missed to mention that a Template can be set against each Request Type in a Service and Service Level Events.

You can create a Report for a Template against each Request Type in a Service with the following:

  • SELECT h_linked_service_id FROM h_itsm_services WHERE (h_incident_email_template LIKE '%RequestMessage%' OR h_problem_email_template LIKE '%RequestMessage%' OR h_service_email_template LIKE '%RequestMessage%' OR h_change_email_template LIKE '%RequestMessage%' OR h_release_email_template LIKE '%RequestMessage%' OR h_knownerror_email_template LIKE '%RequestMessage%')

You can create a Report for a Template against a Service Level Event with the following:

  • SELECT h_id FROM h_itsm_slm_target_evts WHERE h_email_template LIKE '%RequestMessage%'

 

Have you cleared out your calendar for this afternoon? :lol:

Let me know if this helps...

Ehsan

Link to comment
Share on other sites

Hi @Ehsan,

This is definitely great help, many thanks! It's a shame the list of templates are not held in a table though.

Request Incoming....
May I make a request to possibly have the template details stored in a table on Hornbill? I'm sure this will make improvements in other areas such as the BPM where it would be possible to search for a template rather than having to know the name of it, as well as activating or deactivating the template.

I will do this as a mini-project using the details you provide above (again many thanks for that :D) when I get back from holiday.

Samuel

Link to comment
Share on other sites

Guest Ehsan

Hi @samwoo,

Speaking to the Hornbill Platform team, Email Templates are stored in the system's file structure and by design, they're not stored in the database due the complexity that is involved with the template editor. Unfortunately in the short term, there are no plans to change this.

Enjoy your holiday!

Ehsan

 

Link to comment
Share on other sites

  • 9 months later...
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...