Forums

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

how to automate Date in jira

hesam ebrahimi July 10, 2020

Hi ,

I am trying to automate the message sent to everyone if the time that the ticket is created compare to now is greater than 12 hours

but it seems like it i am missing something. can you please let me know what am I missing?issu.jpg

2 answers

1 accepted

0 votes
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.
July 10, 2020

Hi @hesam ebrahimi 

What are you seeing?  Are there any errors in the audit log?

Have you tried to remove the abs expression and only use hours?  Created should always be in the past when this rule fires, so the absolute value should not be necessary.

{{now.diff(issue.created).hours}}

 

Best regards,

Bill

hesam ebrahimi July 10, 2020

Hi @Bill Sheboy , 

After struggling with it i found there was a problem with jira so i had to first check the status and then the priority and then the type otherwise for some reason the tickets will not filter correctly. after that I checked the state that returns true or false. this way it worked perfectly and everything was fine.

{{now.isAfter(issue.created.plusDays(0.5))}}

Equals 

true

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.
July 13, 2020

I am glad that you figured it out.

I find a bit of experimentation is required when doing things beyond the basic automation rules.  There is not a lot of documentation on the functions, and some help points to Oracle sites.  :^)

Three things I have found helpful when debugging issues like this are:

  • Some triggers occur very quickly, such as Create Issue.  Sometimes it helps to immediately add a re-fetch action to reload the data.  It slows down the rule, but in ensures the data is up to date.
  • Adding debug statements or logging comments before/after formula changes can reveal if values are what you expect
  • Some empty/null values cause rules to fail silently, and they appear to succeed.  Checking for non-empty values, or using default values {{issue.someField|someDefault}}, can prevent problems.

 

Best regards,

Bill

Like hesam ebrahimi likes this
0 votes
Dharma Ramos
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.
July 10, 2020

.

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