Hi Team,
I used date diff query to automate RCA being recorded and it is giving a success response but the custom field that must be edited is not getting edited.
Welcome to the community.
Please first check how diff function is used from here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
It seems there is something wrong in your usage.
Also, take a look at this existing thread: https://community.atlassian.com/t5/Jira-questions/automation-for-date-difference/qaq-p/2343981
Don't forget to check Audit Logs.
If problem persists, share your formula here in text.
Hi @Sunny Kanojia -- Welcome to the Atlassian Community!
Adding to Tansu's answer:
There is definitely an error in what you show for using the diff() function to set the "RCA TAT" field.
Please post the smart value expression you have in that field so the community can offer suggestions. Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tansu and Bill,
Thanks for your response. In the RCA TAT, which is a number field, I am trying to capture the difference in hours between two dates, both the events having date and time information. I am getting a success response of the query but the 'RCA TAT' field is still empty.
The query I am using is :
{{(issue.customfield_10149)diff(issue.customfield_101649.hours}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please try this update as you had some misplaced parentheses:
{{issue.customfield_10149.diff(issue.customfield_101649).hours}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, with the updated query, it is giving the success but automation is making the RCA TAT recorded to none, as before. Please advise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here are some follow-up questions to try to diagnose this symptom:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sunny Kanojia
Can you tell what field type is RCA TAT and what exactly you want. The automation is bit confusing.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harsh,
Thanks for your response. In the RCA TAT, which is a number field, I am trying to capture the difference in hours between two dates, both the events having date and time information. I am getting a success response of the query but the 'RCA TAT' field is still empty.
The query I am using is :
{{(issue.customfield_10149)diff(issue.customfield_101649.hours}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sunny Kanojia
Instead of directly copying value, you can create a variable first with the smart value to calculate the difference.
And then add that created variable as a smart value {{variablename}} to RSA TAT field.
You can also log action to debug if the smart value mentioned above is actually giving the difference.
Thanks!
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.
Sure,
Trigger: When issue transitioned
Condition: Issue type equals
Action: Create Variable. Lets call it as: datedifference, in smart value put the following: {{#=}} {{issue.date1.diff(issue.date2).days}}{{/}}
{{#=}} implies math formula just for context
Edit Action: Create a log action and put {{datedifference}} to debug if it calculating or not.
Edit Action: Edit Issue: Choose the RSA TAT field, and put the {{datedifference}}.
This should work because I have used the same mechanism several time.
In any case let me know if it works or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.