JQL for birthday

Henrik Åmark November 29, 2019

Hi!

I have a custom field in Jira cloud for birthdays and I'd like to construct a JQL to filter out everyone who has a birthday today. Is that possible in some easy way?

5 answers

0 votes
AG
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.
July 10, 2023

Hello Team, 

Please try this to put in your Automation.

image.png

Thanks

Asha

0 votes
Zoryana Bohutska _SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 20, 2021

Hi @Henrik Åmark 

Using HR: Employee User Profile you can add any data about employees to Jira including birthdays. This information can be added us custom fields, so you can use JQL for searching. 

imgpsh_fullsize_anim (6).pngimgpsh_fullsize_anim (8).png

This app was created by my SaaSJet team, so if you will have any questions, let me know.

Regards

0 votes
Dmytro Koziarevych -Softlist- May 22, 2021

For Jira cloud, we created a small tool, which could help to remind about the colleagues' birthdays. More details on the Marketplace:

https://marketplace.atlassian.com/apps/1224704/teamployees-birthday-calendar-skills-hobbies?hosting=cloud&tab=overview

By the way - an interesting feature is to get the horoscope prediction for your zodiac sign with this application. 

0 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2019

Hi @Henrik Åmark

To clarify, you're looking for all issues (which represent users) who don't have a birthday today - so a JQL for day and month which ignores year (given that year could be anything in a 100 year spread)?

This isn't something which is possible with base JQL, as it searches for specific dates - eg. startofDay() assumes that is today in 2019, not today in any year.

You'd need to consider a scripted field or similar which can identify if today is a user's birthday using the day and month. An app like ScriptRunner should allow you to do this. I'm not so hot on ScriptRunner Cloud though so best to read through the vendor's support page or contact them directly with that question!

A simple alternative is to set their birthday each year to the actual date - for example:

  • Locate all issues with a Birthday date of 03/12/2019 - set as this regardless of their date of birth
  • Filter them out using the query from Tuncay above
  • Once you reach the end of 03/12/2019, locate all those users with that specific date and change it to 03/12/2020 for the next year.

More manual, but a simpler fix.

Let me know if this was not the issue or the field isn't on an issue-level but a user-level.

Ste

Henrik Åmark December 13, 2019

Thanks. I used the Automation for Jira add-on and simply created a new field where I stored the reminder date, the next birthday then add one year to that field every time a birthday is happening in the automation rule.

Not as clean, but it works.

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 27, 2019

^ I actual think this is an awesome way of doing it - great alternative to the more manual method.

Ste

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2019

Hi @Henrik Åmark 

I think you should clarify a bit more. If you have a date custom field named Birthday and you have issue per person setting the Birthday, you can use jql like below:

Birthday >= startOfDay() and Birthday <= endOfDay()

Henrik Åmark December 1, 2019

You are spot on with your assumptions. I have a custom field on each issue for entering a birthday. The JQL you provided works if the birthday is today, but will not work next year as it will include the year as well. Or did I miss something?

Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2019

Hi @Henrik Åmark 

Sorry for the late response. And yes, you're 100% right, the year part would be a problem for my Jqls. And as far as I know, this can't be achieved without a script or app.

Suggest an answer

Log in or Sign up to answer