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

JQL for specific months

Asher Francis
Contributor
October 2, 2020

So... I think to the answer to this question is "No, not without an add-on" but I'm going to ask anyway!

 

We use our service desk to log audit tickets and these tickets are categorised into Quarter 1/2/3/4 (IE Jan-Mar, Apri-Jun etc) using a cascading dropdown in the form of Audit > Q1

 

What I want to do is automatically categorise the ticket into Q/1/2/3/4 depending on the month in which it was created. I can't seem to use the createdDate >= because that requires me to put in the "Year" which I don't want, because it needs to do this regardless of the year.

 

So basically, if it was created in the month of June, it should automatically categorise it to Q2

Thanks!

2 answers

1 vote
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 2020

@Asher Francis

can you clarify it for me pls? let's say you have following tasks

  • TASK-1 (created 02/02/2020) -> Q1
  • TASK-2 (created 02/02/2021) -> Q1

In this case, you need to return both issues regardless of the year.So you need to have JQL like "quarter = Q1" and both tasks are returned? Do I understand it correctly?

Asher Francis
Contributor
October 2, 2020

That's correct. So regardless of what year they were created, they should be picked up by the automation

 

For example, issue created between 1st January and 31st March > Q1

Regardless of what year 

Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 2020

I do not have much experience with it but I tried automation rules for your usecase and it looks like it's working.

I tried to create new rule for "Issue created" and implemented two conditions (you will need 12, each for each month). Each condition is followed by "edit issue" action.

Selection_010.png

Cconfiguration of condition is:

Selection_011.png And "edit issue":

Selection_012.png You can see I added new custom field Quarter of single select type with values Q1, Q2, Q3, Q4. You can filter easily on this field.

I hope it will help.

1 vote
Liam Green
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.
October 2, 2020

Hi @Asher Francis 

No, not without an add-on.......just kidding!

 

If you use the JQL 'startofYear' then it should work.

e.g. createdDate >= startOfYear() AND createdDate <= startOfYear("+3M") for Jan-Mar

createdDate >= startOfYear("+3M") AND createdDate <= startOfYear("+6M") for Apr-Jun

It will then roll with each year.

A couple of things to note, make sure that the "+3M" is in "quotation marks" and use a capital M not lowercase m as lowercase refers to minutes.

Hope that helps

Regards, Liam

Asher Francis
Contributor
October 6, 2020

Hi Liam 

Only just seen this - and we seem to be communicating on two separate questions!

I'll try this and let you know how I get on

Thanks

Liam Green
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.
October 6, 2020

Hi Asher

We are indeed on two different tickets - I'd noticed this the other day!

I'm pretty confident the above should work but do let me know.

Thanks, Liam

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events