Forums

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

Filter creation

Anthony Pitaval September 20, 2024

Hi all, 

I'd like to create a filter through a JQL search. The goal is to sort out all tickets created by two groups of users and created between Jan 1st and Dec 31st of a year (I'd like to run it for 2022, 2023, 2024 and coming years). 

My request is the following: 

assignee in membersOf("Hardware R&D France") or assignee in membersOf("Software R&D France") AND created > "2024/01/01"

I can get the tickets list but some from 2022 and 2023 were extracted too. How can I better define or restict the time slot and have the tickets of one year only?

 

Thanks for your help. 

Anthony

 

2 answers

2 accepted

0 votes
Answer accepted
Evgenii
Community Champion
September 21, 2024

Hi, @Anthony Pitaval 

 

You can use such filter, if you want to strictly declare year:

(assignee in membersOf("Hardware R&D France") or assignee in membersOf("Software R&D France")) AND (created >= "2024/01/01" AND created <= "2024/12/31")

 

Don't forget to use ( ) to group conditions. In my example i splitted conditions, that user must be in any of 2 groups, and filtered by date creation.
Without grouping your filter will select all issues for group "Hardware R&D France" AND all issues for "Software R&D France" created from the 01.01,2024

If you want to select issues for current year, you can use such JQL:

(assignee in membersOf("Hardware R&D France") or assignee in membersOf("Software R&D France")) AND (created >= startOfYear() AND created <= endOfYear())
 

 

Anthony Pitaval September 25, 2024

Hi @Evgenii , 

Thanks for your help. Works fine. 

 

Do you know whether it would be possible to only extract/display the month of the date.

The idea would be to have date formats like 2024-01 for months with one digit and  2024-10 for months with 2 digits. 

That would help me a lot in the retreatment afterwards. 

 

Thanks

Evgenii
Community Champion
September 25, 2024

Hi, @Anthony Pitaval 

Not sure, that I understood the idea correctly. You want to take year and date from date field, like "Created" and save it in another custom field like "2024-09" ?

If answer is "yes", than you can use automation rule, which will make this operations on issue creation. Take date, parse it and save to anoher field of issue.

Like Anthony Pitaval likes this
Anthony Pitaval September 25, 2024

You understood well. 

I've never used automation rules sp far. Is there some tutorials that I could use to help me do this operation?

 

Thanks for your help. 

 

Evgenii
Community Champion
September 26, 2024

Sure. 

About Date smart values in Jira Automation you can read here:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

 

I made a small example. In It I take year and month of creation date. The I show it in log and save to summary:

Screenshot_12.pngScreenshot_13.pngScreenshot_14.png

0 votes
Answer accepted
Kristine Daniels September 20, 2024

Try adding parentheses around your assignee clauses

(assignee in membersOf("Hardware R&D France") or assignee in membersOf("Software R&D France")) AND created > "2024/01/01"

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