Forums

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

How to get the date of the first issue created and the date of the last issue created in a project?

SIN August 16, 2023

My client is using Projectrak with Jira and he needs to know the creation date of the 1st issue created date (will update the actual start date field in projectrak automatically using jira automation) and the creation date of the last issue created (will update the actual end date field in projectrak automatically using jira automation).

Are we able to do this using jira automation?

Appreciated for your help~

 

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
August 16, 2023

Hello @SIN 

Do you need a single rule that will work against multiple projects?

How many issues exist in each project where the rule needs to run?

There is a Lookup Issues action that can be used to retrieve issues based on a JQL, and you can pull the first and last issue from that data set, but it is limited to returning 100 issues. If your project has more than 100 issues you would need to add something to the JQL to try to limit the issues, perhaps with one JQL that includes criteria to select issues created before a given date to get the earliest issues, and a second JQL that includes criteria to select issues created after a given date (or in the past X days/months relative to the current date) to get the latest issues.

SIN August 16, 2023

Yes, I need global automation rule but still dunno how many issues exist in each project since this is a new project yet, so my client hasn't created any issues yet.

 Do you mind to help me show the formula for the automation? how to get the first and the last issue created date?

 

Thanks

Trudy Claspill
Community Champion
August 21, 2023

When you use the Lookup Issues action you provide a JQL for the issues you want to select.

project=<yourProject> ORDER BY Created ASC

If you set an ORDER BY Created ASC clause, then the first issue in the list will be the first issue created. You can access the first issue in the results set with the smart value

{{lookupIssues.first}}

If there are 100 issue or less in the project, then the last issue in the results set will be the last issue created. You can access the last issue in the results set with the smart value

{{lookupIssues.last}}

If you want to reference a field in that issue, you add the field name in the smart value;

{{lookupIssues.first.createddate}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events