Jump to content

Team assignment notification template


Stefania Tarantino
 Share

Recommended Posts

When a ticket is assigned to a team a Team Assignment Notification is sent out automatically from Hornbill to everyone in that team.
It uses the Hornbill template called 'TeamAssignmentNotification'
The template contains variables to add the Summary and Description.
However it also appears to contain the following text - 'No Summary provided' and 'No Description provided'
So even when the summary and description are populated the above text still appears.

I can see the template in Platform Configuration>templates

Is this a template created by Hornbill or would this have been created by us when we set our instance up?

Has something changed?

Is it OK to go ahead and delete the above incorrect text?

I cannot see anything in the BPM to show that the template has been sent - is there somewhere the action can be seen?  

I presume this is a hidden trigger when a request is assigned to a team?

 

Thanks

Link to comment
Share on other sites

@Stefania Tarantino

1 minute ago, Stefania Tarantino said:

When a ticket is assigned to a team a Team Assignment Notification is sent out automatically from Hornbill to everyone in that team.

10 minutes ago, Stefania Tarantino said:

I cannot see anything in the BPM to show that the template has been sent - is there somewhere the action can be seen?  

I presume this is a hidden trigger when a request is assigned to a team?

This is dictated by guest.app.requests.notification.notificationType.assignmentTeam app setting. It is enabled by default. Disabling it will stop notifications sent to the team.

4 minutes ago, Stefania Tarantino said:

It uses the Hornbill template called 'TeamAssignmentNotification'

Assuming you are talking about email notifications then this is dictated by guest.app.requests.notification.emailTemplate.groupAssignment app setting. The default value is "TeamAssignmentNotification" and can be changed to a different value representing an email template that exists in your instance.

8 minutes ago, Stefania Tarantino said:

Is this a template created by Hornbill or would this have been created by us when we set our instance up?

This is a default template, it means it exists in every instance when the instance is created by Hornbill. It can be amended, reconfigured as needed.

If you like to understand more about notifications in general, including the notifications for request assignment please review: https://wiki.hornbill.com/index.php?title=Service_Manager_Notification_Settings

 

14 minutes ago, Stefania Tarantino said:

The template contains variables to add the Summary and Description.
However it also appears to contain the following text - 'No Summary provided' and 'No Description provided'

It is possible the values for summary and description have been configured to use ESP conditions for when the summary and description variables have no value. We can't say if and how without looking at how the template is configured.

17 minutes ago, Stefania Tarantino said:

So even when the summary and description are populated the above text still appears.

It can be that the email is triggered before the request has summary and description hence the variables will have no value. If the template is using ESP conditions, it can also be the condition is not configured as needed. We can't say if and how without looking at how the template is configured.

19 minutes ago, Stefania Tarantino said:

Has something changed?

Is it OK to go ahead and delete the above incorrect text?

If the text is configured based on ESP conditions, is not just simply deleting the "incorrect" text. The condition needs to be reviewed to understand why the text appears when it is believed it should not. 


What exactly you're asking when you say if something has changed?

Link to comment
Share on other sites

Thank you for the replies.

I wondered if the ESP conditions had been setup as you suggest but that somehow they have stopped working.  I will take a look at the above settings and link for the ESP conditions.

I have attached an email notification sent for a request that has a summary and description and the current template.

 

Team assignment notification template.PNG

Team assignment notification request with Summary and Description.PNG

Link to comment
Share on other sites

@Stefania Tarantino it is definitely a template that has been changed from the standard default... it is possible the summary/description are supposed to be in an ESP condition but maybe something has broken that... for example, these conditions can easily break if the template is copied, pasted somewhere else (e.g. Word or other editor) where is reformatted and such, then pasted back... unfortunately I can't say from a screenshot, if you think the template is set up correctly but still not working properly then we can have a look via a support request.

  • Like 1
Link to comment
Share on other sites

@Stefania Tarantino 
 

1 hour ago, Stefania Tarantino said:

Show the summary unless it is empty and if it is empty show the following text - 'No Summary Provided'?

You need to chain 2 conditions:

 

1. For the summary having content and the ESP condition would be:

 

image.png

I wrote the condition here for better visibility

SUBSTRING('{{.H_summary}}', 4, 10) != 'H_summary'

 

 

2. For the summary not having content and the ESP condition would be:

image.png

I wrote the condition here for better visibility:

SUBSTRING('{{.H_summary}}', 4, 10) = 'H_summary'


This is how it would look in the template, even if they look like one block, there are 2 separate conditions there:

image.png

The template source would be something like this (so it shows there are 2 conditions there):

image.png

 


Also this is a similar discussion:

 

Link to comment
Share on other sites

30 minutes ago, Victor said:

@Stefania Tarantino 
 

You need to chain 2 conditions:

 

1. For the summary having content and the ESP condition would be:

 

image.png

I wrote the condition here for better visibility

SUBSTRING('{{.H_summary}}', 4, 10) != 'H_summary'

I am unsure of what the syntax means.  Can you explain what the expression means in words please? 

I am a little confused - doesn't '!=' mean not equal to?

Is this better than using the empty modifier?

In another template we have I can see the following ESP expression, which seems to combine the empty modifier and ESP, but I don't understand the expression:

image.png.bb828b10f142a272084e2e9e02cbf64a.png

 

 

Link to comment
Share on other sites

@Stefania Tarantino the expression above is a standard SUBSTRING expression use in SQL syntaxes. What it means is that it will check for the value of the variable to not be its syntax. Is just one way of doing this, I have included another option further below. But you cannot use the empty modifier on ESP conditions, the variable itself in the condition will never be empty, it will always have a value.

The way the variables work in templates is they correspond to a table field. For example "{{.H_summary}}" variable corresponds to the request summary for the respective requests. The way the email template variable work is that if the request summary has a value in the database for that request, the variable will translate into the summary value. If the request summary does not have a value in the database, the variable will not translate into anything and it's value will be {{.H_summary}}. Therefore for the condition to check if the request summary has a value we need to make sure the variable value is not {{.H_summary}}. Another expression you can use there (instead of SUBSTRING) is:

'{{.H_summary}}' NOT LIKE '%{.H_summary}}%'

We need {{.H_summary}} on the left so the engine reads the value as a variable so it translates as described above and we need the %{.H_summary}}% in the right so the engine does not read the value as a variable that it needs to translate.

EDIT: to clarify, we don't specifically need %{.H_summary}}% in the right or the "NOT LIKE" or the "SUBSTRING" expressions. We would need anything or something that would make the expression validate if the value is or isn't {{.H_summary}} (depending if the expression needs to check for a value in the correspondent table record or not - meaning an empty value in the correspondent table record). The above are just two suggestions that achieve this.

Link to comment
Share on other sites

  • 2 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
 Share

×
×
  • Create New...