SLA Custom Field Automation

Cristina Carrillo
Contributor
May 4, 2023

I have a custom field (resolved with customer) automation set as a workaround for SLA as we measure two different types of SLA. I cannot purchase any apps in marketplace, if there are any 

free apps I am more than happy to look into them. 

I have a number field set to hold the days

Automation is as follows:

Field Value changed is set for my custom field

Edit issue is where the number field is and I have {{issue.customfield_xxx.diff(created).days}} in the options

Based on the audit log it is running successfully but the day number is not displaying in the number field. 

 Screenshot 2023-05-04 at 8.37.17 AM.png

2 answers

2 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2023

Hi @Cristina Carrillo 

Would you please post images of the details of your issue edit action and of the audit log details for the rule?  Those may help explain what you are observing.

Also, what do you see if you write that value to the audit log directly with the log action?

Kind regards,
Bill 

Cristina Carrillo
Contributor
May 10, 2023

I have a custom number field that will hold the automated number - I attempted to mirror my current SLA automation. 

This is the automation in question. When a peer selects either value in the Resolved with Cx field I would like to see the number of days between Created and when a value is selected - unsure if it can only calculated date fields vs value 

Screenshot 2023-05-10 at 3.48.06 PM.pngScreenshot 2023-05-10 at 3.48.18 PM.pngScreenshot 2023-05-10 at 3.48.28 PM.png

Cristina Carrillo
Contributor
May 10, 2023

This is the automation I mirrored - in the screenshot below you can see the number for this automation but not the Resolved with Cx fieldScreenshot 2023-05-10 at 3.48.58 PM.pngScreenshot 2023-05-10 at 3.49.52 PM.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2023

If you write the custom field and the expression to calculate the date difference directly to the audit log in the rule, what do you see?

Cristina Carrillo
Contributor
May 11, 2023

Like this?Screenshot 2023-05-11 at 1.46.16 PM.png

Like Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2023

Yes, like that.  Also try writing just {{issue.customfield_19022}} to the log.  Then run your rule and post an image of the audit log details.  Thanks!

Cristina Carrillo
Contributor
May 15, 2023

Screenshot 2023-05-15 at 1.55.52 PM.pngScreenshot 2023-05-15 at 3.05.44 PM.png

Sorry for the delay in response

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2023

This seems to indicate the smart value expression is the cause.  Let's try to write just the field to the audit log:

{{issue.customfield_19022}}

That will confirm if it contains what you expect before using the diff() function on it.

0 votes
Answer accepted
Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2023

Hi @Cristina Carrillo ,

 

You may need to check the data type of the Custom Field that you are using. It may not accept the value if it's mismatched or negative value.

 

Try adding abs {{issue.customfield_xxx.diff(created).days.abs}}

Cristina Carrillo
Contributor
May 8, 2023

Thank you @Benjamin - however I am still not seeing the number being displayed - I have added the abs. Auditlog shows the automation is running successfully.

{{issue.customfield_19022.diff(created).days.abs}}

Cristina Carrillo
Contributor
May 10, 2023

Are you still able to assist me?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events