Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

sla to be copied to custom field

Sonika Maddinapudi October 30, 2024

Hello, 
Is there any way of copying the sla data (for example: Oct 30, 10:30 PM ) to my custom field (format-- date time picker)


Thanks

2 answers

0 votes
Samuel Gatica _ServiceRocket_
Community Champion
October 30, 2024

Hi @Sonika Maddinapudi 

With Automation, you can use this smart value to update a custom field

  • {issue.SLA_NAME.ongoingCycle.breachTime.jira}}

 

Example for Time to resolution SLA

{issue.Time to resolution.ongoingCycle.breachTime.jira}}

Screenshot_3.png

 

Best regards

Sam

0 votes
Kris Dewachter
Community Champion
October 30, 2024

Hi @Sonika Maddinapudi ,

What SLA data do you want copied exactly? Is it the target date/time? Or the time the SLA was met ? or something else ?

Best regards,

Kris

Sonika Maddinapudi October 30, 2024

Hi @Kris Dewachter ,
My sla start counting from comment for customers and ends at next comment for customers and we didn't have any target date/time
In this sla the data is in the format of (due date centric format) Oct 30, 10:30 PM and I want this to be copied to my custom field (date and time picker format)

Thanks

Kris Dewachter
Community Champion
October 30, 2024

Hi @Sonika Maddinapudi ,

So your SLA has no goals time, and starts counting when a public comment has been set, and ends when another public comment has been set. I'm not sure how the SLA will react to that because you have the same start and end triggers.

But lets say that for example:

  • My SLA starts running today Nov 30th at 1PM
  • My SLA stops running today at 5 PM

What value do you want stored in the custom field? Since the custom field is in a date format, i presume it's either the start- or the end-date ?

Best regards,

Kris

Sonika Maddinapudi October 31, 2024

Hi @Kris Dewachter 
In the above example you mentioned the value can be stored as Nov 30 2024, 5:00 PM in my SLA 
Now I want this date Nov 30 2024, 5:00PM to be copied in my custom field.
I was attaching the screenshot how my sla was popping
SLA.png
I will give you the clear scenerio is I want to calculate how quickly we are responding to the customers through comments i.e we have 2 types of comments one is add internal note and second is reply to customer. Now when a ticket was raised an automated comment (reply to customer) is made by our team and after few analysis we will make a reply to customer in comments 
Now the metrics is I want to find the diff between the two comments mentioned above. (first reply to customer to second reply to customer)
Thanks

Kris Dewachter
Community Champion
November 3, 2024

Hi @Sonika Maddinapudi ,

If you only want to use the SLA for reporting the time between comments, i would suggest one or two automation rules to do the calculation. Also, an SLA does not allow to distinct between an internal and an external comment.

So for the first automation rule, I would set a trigger when an internal comment is made and then store the current time in a custom date field.

And a second automation rule that is tiggered when a public comment is made. This one will calculate the difference between the current time, and the time stored in the first automation rule.

Best regards,

Kris

 

Sonika Maddinapudi November 3, 2024

Thanks @Kris Dewachter 
Could you please give the detailed steps for these automation rules because in triggers I was having only comment added, comment added during status transition, comment added while editing the issue fields.

Thanks
Sonika

Kris Dewachter
Community Champion
November 4, 2024

Hi @Sonika Maddinapudi ,

The first automation rule, that sets the current time when an internal comment is added, would look something like this: 

Screenshot 2024-11-04 at 20.17.11.png

1. The trigger is when a comment is added (any action)

2. The is statement checks if the comment is an "Internal" comment

{{comment.properties."sd.public.comment".internal}} equals true

3. In the "Edit issue" action, you set a "Date Time Picker" custom field with the current time by using the {{now}} smart value

 

The second automation rule is triggered when an external comment is added, and will calculate the different between the date in the custom field, and the current time with this formula. The automation rule has the same trigger, but you check for an external comment with this formula

{{comment.properties."sd.public.comment".internal}} equals false

 

And then this formula will calculate the number of minutes, between the current time, and the time stored in the custom field of the first automation rule. This is the formula: 

{{now.diff(issue.<name of custom field>).minutes.abs}}

More information on date calculations with smart values can be found here : 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

 

Best regards,

Kris

 

 

 

 

 

 

 

Sonika Maddinapudi November 6, 2024

Hi @Kris Dewachter 
Finally my requirement was fulfilled.
Thank you for the detailed answers. It worked...

Thanks
Sonika

Like Kris Dewachter likes this
Kris Dewachter
Community Champion
November 6, 2024

Hi @Sonika Maddinapudi ,

Nice to hear my answer helped solve the issue.

Feel free to click the "Accept Answer" button next to my answer to help others in the community solve similar issues.

Best regards,

Kris

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events