Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Code Block
titleThe current month (example: November)
birthday: *-11-*
Code Block
titleAll 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 In case you don't want to try it on your own, we 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

Note

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.

Filter by label (Content by label)
showLabelsfalse
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "user-profiles-confluence" and type = "page" and space = "KB"
labels user-profiles-confluence profile-list macro

Page Properties
hiddentrue
Verwandte Vorgänge
Jira Legacy
serverIdc0db702e-3cc3-3d25-9da5-272ed3ba7af5
keySUPPORT-5253