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

Cannot use date calculations in JIRA

jmartin3 May 27, 2021

We are trying to create some structure groupings based on dynamic dates, basically if the JIRA was created more than 30 days ago.

 

We tried each of the following and all came back with a "cannot parse" error message.  

{{now}}

{{#now}}

<-30d

We are using JIRA 8.5.9, so I am not sure if it is a version issue or syntax.

2 comments

Comment

Log in or Sign up to comment
Payne
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 27, 2021

You're on the right track; try this in the search:

created <= -30d

jmartin3 May 27, 2021

thanks!  It works fine in JQL but won't work in Formula

Screenshot 2021-05-27 134436.png

Payne
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 27, 2021

Ah, OK; this looks to be some sort of add-on that I'm not familiar with. Sorry.

Support Team _ALM Works_ May 27, 2021

Hello @jmartin3 ,

David from ALM Works here.  

Based on the goal you describe, you should be able to accomplish this by adding a formula column to your structure and then grouping the issues by the result.  Expr language is the Structure feature used to write formulas within a structure.

Here is an example formula you may be able to use for your purpose.

IF(days_between(created,today())< 30;"Recent";"Old")

Basically if the days between when the issue was created and "today" are less than 30, it will show "recent" in the column and "old" if days between are greater than 30.

You can expand the number of conditions and results as well.  This is covered in the Expr Function Reference doc I linked above.

Once you have the Formula in place and returning the results you want, the next step is to add a Group Generator.  

You will want to Group by Text Attribute specifically.  Pick your new Formula column from the "Group By" drop-down list and you should be in business.

I have made some assumptions here, so if this is not what you are looking to do, or you have any additional questions, please feel free to contact our support team directly!  We can be reached through our service portal, support.almworks.com, or email via support@almworks.com.

I look forward to your feedback!

Best,
David
www.almworks.com

Like # people like this
jmartin3 May 27, 2021

OUTSTANDING!!!

I was able to adapt the equation you provided into the specific use case needed and it works like a charm.  It was the "today()" aspect that I could not figure out.

 

Thank you for the quick responses

Support Team _ALM Works_ May 27, 2021

@jmartin3 ,

So glad to hear it helped!!  

Best,
David
www.almworks.com

TAGS
AUG Leaders

Atlassian Community Events