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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL for birthday

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?

4 answers

0 votes

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

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. 

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

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.

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

Ste

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()

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?

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
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

506 views 16 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you