Hello community,
I’m trying to include the SLA duration in an Automation email template in Jira Service Management, but the smart value always renders empty.
Here’s my current template:
Dear customer: {{issue.key}}
We inform you that we received your request, created on {{issue.created.format("dd/MM/yyyy")}}, about {{issue.summary}}.
It is under verification and being processed by the Unit of Banking Operations, assigned to {{assignee.displayName}} and supervised by the Officer {{issue.Oficial.displayName}}.
The maximum time established to complete this request is {{issue.sla."SLA Centro de Excelencia de Servicios".goalDuration.friendly}} working hours.
Our service hours are Monday to Friday from 8:00 a.m. to 3:00 p.m. Requests sent outside this schedule will be processed on the next business day.
The date renders correctly with {{issue.created.format("dd/MM/yyyy")}}.
The assignee also works.
But the SLA value (name: SLA Centro de Excelencia de Servicios) always comes out empty in the email.
What I’ve tried:
{{issue."SLA Centro de Excelencia de Servicios".goalDuration.friendly}}
{{issue.sla."SLA Centro de Excelencia de Servicios".goalDuration.friendly}}
{{issue."SLA Centro de Excelencia de Servicios".remainingTime.friendly}}
Adding a Re-fetch issue data action before sending the email
Still, the SLA value does not render.
Questions:
What is the correct smart value syntax for including SLA goal/remaining time in an email template?
Is there a timing issue when the rule is triggered on issue creation (before the SLA is calculated)?
Do I need to use a different trigger (e.g., SLA started, scheduled rule) to make SLA values available in the template?
Any guidance would be very appreciated.
Thanks in advance!
When are you sending this email, on issue creation?
Then its correct the values are empty as the SLA calculation is only Done after the issue creation.
You need to de a re-fetch action.
Also you need to use the smart value as;
{{issue.customfield_XXXXX.ongoingCycle.goalDuration.friendly}}
See also this KB article; https://support.atlassian.com/jira/kb/comment-with-sla-smart-value-fails-in-jira-automation-rule/
Thanks Marc not working the link alternatives
And the custom field, the ir not a custom field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
An SLA on an issue is also a custom field.
Can you provide you full automation rule and what type of project is the JSM project, team or company managed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure but let me share just the important part of the rule
This is for the email notification
El tiempo máximo establecido para concluir este requerimiento es de {{issue."Time to resolution".remainingTime.friendly}} horas laborables.
Nuestro horario de servicio es de lunes a viernes de 8:00 a.m. a 3:00 p.m., Las solicitudes remitidas fuera de este horario serán diferidas para el siguiente día laborable.
En caso de que {{assignee.displayName}} o {{issue.Oficial.displayName}} no estén disponibles, por favor reasignar a otro(s) miembro(s) del equipo.
Saludos cordiales,
Right now I am trying with the SLA "Time to resolution". This SLA is working properly.
Depending on the condition it is 2 hrs 40 hrs etc.
My last try was {{issue."Time to resolution".remainingTime.friendly}} and didnt work.
I dont know if this affects, I hope not but depending on a list of cascading options the is one SLA. something like this
If person in the portal chooses 1-B it is 4hrs
If person in the portal chooses 3-A it is 2hrs
If person in the portal chooses 2-C it is 40hrs
I want this # of hours to me sent in the email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sebastian,
You might try: {{issue.<sla_name>.ongoingCycle.goalDuration.friendly}}
And here is some more guidance:
https://support.atlassian.com/jira/kb/how-to-find-smart-value-of-sla-component-of-jsm-issues/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It remains empty, not any value
I have tried some at least these options:
{{issue."Time to resolution".remainingTime}}
{{issue."Time to resolution".ongoingCycle.goalDuration.friendly}}
{{issue.<Time to resolution>.ongoingCycle.goalDuration.friendly}}
Note I am currently using "Time to resolution" SLA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.