Forums

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

Find people (objects) who have birthdays in the next month

Martin Böhme
Community Champion
February 8, 2023

Hi everyone!

I want to build an automation that runs once a month and that creates an issue for every person in the company who has their birthday in the upcoming month.

I have an object scheme "Organization" with object type "Person" and the attribute (type date) "Date of Birth".

Now, I want to create an AQL query that returns all Person objects that celebrate their birthday in the next month.

 

Example:

Today is Feb 8 2023.

So I want to see people born on Feb 9 1994 or Feb 28 1976.

 

Problem

The thing I struggle with is the year.

"Date of Birth" >= startOfDay("-1d") AND "Date of Birth" <= startOfDay("+31d")

would return people born in the next 31 days because it takes the year into account.

So people born on Feb 28 2023 would show up - but of course this makes no sense.

 

How can I query for the month and the day but not for the year?

0 answers

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