I want to create a birthday list based on the data stored in the user profiles. I have a text field "birthday" which is populated with dates in the form yyyy-mm-dd. I want to display birthday lists for:
the current day
the current month
all users
Which queries can I use for this purpose?
Solution
Our add-on uses the Lucene Query Syntax. As such, any filter criteria have to be built according to these rules.
Taking into account the format is yyyy-mm-dd:
The current month (example: November)
birthday: *-11-*
All users
(1*) OR (2*)
(this is a very broad filter which might also show profiles where the birthday has not been entered)
The current date isn't contained because you cannot keep an up-to-date list this way. You would have to edit the macro daily. Likewise, you will have to edit the above macro for birthdays in the current month every month.
We also published an article about possibilities for a birthday list as a techblog article: https://www.communardo.de/techblog/2014/07/15/birthdaylist-confluence/ Please be aware that this can only be used as a basis for developing your own macro, as it uses a slightly different date format and it was written for User Profiles for Confluence version 1.9.
Developing a macro which always shows the current day's/month's birthday is outside of our product support. If you are still interested in that option, contact out support for further details.