Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation rule is not updating custom field

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.

edit issue field.PNG

Rule is executed but data is not updated in the custom field.

Please help me

2 answers

1 accepted

0 votes
Answer accepted
Sherry Goyal Atlassian Team Dec 10, 2020

Hi @Srujana Deva 


{{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.



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.

audit log.PNG

Sherry Goyal Atlassian Team Dec 10, 2020

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.

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.

Thanks @Sherry Goyal 

{{now.diff(issue.created).hours}} resolved the issue. I am able to seed the data to custom field now.

Like Sherry Goyal likes this
0 votes
Liam Green Community Leader Dec 10, 2020

Hi @Srujana Deva 

Welcome to the Community!

Have you checked that the name of the field is correct?  It isn't always easy to spot.

Regards, Liam

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


Am I doing it right?



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.

Liam Green Community Leader Dec 10, 2020

Can you take a screenshot of the audit log from Automation please?

audit log.PNG
Rule execution is working fine. I'm seeing success status but no value updated in the custom field

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Automation

New to Jira Automation - goodbye Cron (sort of), hello new project created trigger, new additions to

Hey Everyone! Simeon from the Automation team here. I'm delighted to share some new features and improvements that we are shipping to Jira automation (Cloud only). Firstly, @Sam Harding&nbsp...

2,870 views 10 23
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you