Forums

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

How to get the total number of tickets in a project

Krishtee
Contributor
August 11, 2023

Hello,

I need to build an automation which:

1. For a specific project (XXXProject), calculates the total number of tickets whose status is in "Done" and having issue type "Epic".

What I got so far:

NumberofTickets.PNG

 

Once the automation is run, the value obatained should be displayed in the dashboard under column "Total Number Of Tickets" which is a number field:

Dashboard.PNG

But, when i'm running my automation, I'm not getting any values in the dashboard.

Can anyone advise what's wrong with my automation?

Thanks.

 

3 answers

1 accepted

2 votes
Answer accepted
Kseniia Trushnikova
Community Champion
August 11, 2023

Hi @Krishtee,

{{issues.size}} can be used either with the trigger Incoming Webhook or the trigger Scheduled. Check out more info here in the documentation.

Here's the example of the rule:

Rule Example.png

Krishtee
Contributor
August 11, 2023

Hi @Kseniia Trushnikova

Thanks.

I tried your solution.

It is displaying 1 for each tickets whose status is set to Done.

However, I need a calculation which will calculate the sum of all the tickets which have status Done.

For eg: If in a project I have 5 tickets and 3 out of it is in status Done, then the calcualtion should display 3 in the dashboard (column Total Number Of Tickets)

Kseniia Trushnikova
Community Champion
August 11, 2023

@Krishtee, my bad for not mentioning to select Process all issues produced by this trigger in bulk.

Try to run the rule once more with this option enabled:

Bulk.png

Krishtee
Contributor
August 11, 2023

@Kseniia Trushnikova

Thanks for the help.

It works as expected.

Krishtee
Contributor
August 17, 2023

Hi @Kseniia Trushnikova

I have a custom field "Lead time", where i'm calculating the difference between field Created and Updated.

Please find below my automation:

LeadTimeCalc.PNG

This rule works correctly and is outputting the result in my dashboard:

DashboardLeadTimeOnly.png

Next, I want to calculate the sum of all the values from field Lead time. For that, I have created another custom field "Total Lead Time".

For example: Total Lead Time = 1 minute 35 seconds + 1 minute 57 seconds + 7 days 18 hours 44 minutes 13 seconds

My automation is as follows:

TotalLeadTime.PNG

But, when this rule is trigerred, I'm not getting any result in the dashboard (column Total Lead Time).

DashboardLeadTime.png

Can you please advise what is wrong?

Thanks.

Kseniia Trushnikova
Community Champion
August 17, 2023

Hi @Krishtee,

I'm not sure if it's even possible to sum up such values. {{issue.created.diff(issue.updated)}} returns a string, but only numbers can be summed up.

Anyway, I'd recommend you to create another question so other community users can advise you on it.

Krishtee
Contributor
August 17, 2023

Hi @Kseniia Trushnikova

Thanks.

Yes I will create another question.

0 votes
Melissa C
Contributor
January 20, 2024

Hello Everyone,

I have a similar requirement. I need to get how many Tasks are in an Epic

 

We create Epics and each Epic has a number of Tasks. I'm looking to how many Tasks are open / closed.

I have tried the lookup feature but when I use issues.size it gives me the number of items in the query not the ones in the Epic

 

Any suggestions would be great 

0 votes
Alisa Zamaraeva
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.
August 11, 2023

Hi Krishtee,

To calculate the number of tickets you have to run a jql query inside the rule with lookup issues action and then use smart value {{lookupIssues.size}}.

You can see the example on my screenshot below:

Screenshot from 2023-08-11 15-10-07.png

Hope this helps!

Krishtee
Contributor
August 11, 2023

Hi @Alisa Zamaraeva

Thanks for helping.

But I don't have the "lookup issue" feature available.lookup.PNG

Can you please advise how to proceed?

Kseniia Trushnikova
Community Champion
August 11, 2023

@Alisa Zamaraeva, it looks like @Krishtee's using Jira Server/Data Center. Lookup issues is available only for Jira Cloud.

Good answer though!

Like Alisa Zamaraeva likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events