Check if reporter have more then 2 tickets in "done"

Omri Zeman February 3, 2025

Hey, We have a request type for new courses in our company,
Each user can ask for just 2 courses in one year, if they complete 2 courses
I want automation that will immediately move it to "Canceled"  status.
Right now there is 2 statuses that define a complete course: "Done" and "Course Incomplete".
So I made JQL that at first search if this user has in the same year tickets that in that status, and after made smart value condition to check if he has 2.
but the automation stop when i created 3 ticket by me one and that's right because i can make more than 2 tickets but i want to cancel him if i got another 2 that already closed this year.

im attach a picture of my automation.
this is the JQL

reporter = currentUser() AND status IN (Done, "Course Incomplete") AND created >= startOfYear() AND created <= endOfYear()


autmation count e.PNG


2 answers

0 votes
Duc Thang TRAN
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.
February 3, 2025

Hello @Omri Zeman 


{{lookupIssues.size}} will show the result of your JQL query. I think you need to use the "greater than 2 " option. That will check if the reporter has more than 2 ticket with the status "Done" or "Course Incomplete."

Hope this can help 

 

Omri Zeman February 3, 2025

Its help but do you know how i can write it in JQL ?

Duc Thang TRAN
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.
February 3, 2025

@Omri Zeman 

Can you try this smart value on your jql ? 
reporter = "{{issue.reporter.emailAddress}}"

 

 

Omri Zeman February 3, 2025

Yeah its not let me to validate the query
4.PNG

Duc Thang TRAN
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.
February 3, 2025

@Omri Zeman 

It strange , work on my side jira cloud 

Capture d’écran 2025-02-03 150739.png

In my opinion, you can exclude the JQL condition part because the lookup query already does the same querry

0 votes
Victor Law
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2025

Hi @Omri Zeman

Can you please share a screenshot of the automation's audit log and the workflow associated with the Request Type?

I suspect no transition allows the automation to transition the Jira issue from the created issue status to the Cancelled workflow status.

Thank you.

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