Skip to end of banner
Go to start of banner

How to create a birthday list

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Question

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 in the Profile List macro?

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)

Birthdays for the current date isn't contained as an example 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 during 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.

Resources

  • Further examples how to create queries using Lucene query syntax (see section "Extended Search")
  • Documentation of the Profile List macro

Developing a macro which always shows the current day's/month's birthday or reviewing code of such a macro is outside of our product support. If you are still interested in that option, contact out support for further details.

 

  • No labels