I'm trying to edit the issue field when there is an issue transition.
I have set the edit issue field condition with smart value -> {{issue.created.diff(issue.resolved).hours}}
With this I'm trying to find the get the data in hours and mapped it to a custom number field.
Rule is executed but data is not updated in the custom field.
Please help me
{{issue.created.diff(issue.resolved).hours}} will give negative value as order matters!
Try other way around: {{issue.resolved.diff(issue.created).hours}} or else please add try to paste the value to audit log and test the output. You can take help from here to debug a rule.
Thanks
Sherry
I changed the smart value too and even then no value is updated in the custom field. Let me add debug after updating {{issue.resolved.diff(issue.created).hours}}.
The audit log says it is successful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Technically resolution means when it moves to done status. I think you are moving it to another status. You should try {{now.diff(issue.created).hours}}
I would suggest to add "Log action" and try to print values there if this does not works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried adding debug for your last smart value {{issue.resolved.diff(issue.created).hours}}. Nothing in logs too.
Let me try what you suggested right now and add debug. I am adding log to print values but earlier didn't see anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Sherry Goyal
{{now.diff(issue.created).hours}} resolved the issue. I am able to seed the data to custom field now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the Community!
Have you checked that the name of the field is correct? It isn't always easy to spot.
Regards, Liam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Liam Green ,
Thank you for the reply!
Yes I have provided the name of the field right.
I see that the rule is executed but data is not updated in the custom field.
I took the formula from https://community.atlassian.com/t5/Automation-questions/How-to-calculate-the-resolution-time-as-a-difference-between-2/qaq-p/1488447
Am I doing it right?
Regards,
Srujana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What I want to do is simple when the issue is transitioned to "In QA" status then I want to update "Time taken to resolve" custom field with "{{issue.created.diff(issue.resolved).hours}}" which gives me the duration between created and resolved in hours.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you take a screenshot of the audit log from Automation please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rule execution is working fine. I'm seeing success status but no value updated in the custom field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having the same problem, where I'm performing a math operation on a number field using smart values and it doesn't seem to do anything. My log messages show the number being the same before and after the increment operation, no errors in audit log, but my number isn't changing. I'm wondering if anyone has solved this, are smart values not supported within an automation script assign operation?
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.