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 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.Basics:

It's still a user macro, so "activating" it in Confluence will look the same as before. We developed it on your Confluence version and User Profiles for Confluence 2.1.0 so in case anything doesn't work as expected, please make sure you're already using the latest version.

Changes:

You can now enter the profile element name as macro parameter, meaning you can configure the macro like any old Confluence macro after you've added it to the page and then decide if it should filter according to the "Birthday" element or for example a different element "Start date".

No matter which profile element you choose, the macro still expects a date in the syntax DD.MM. The year after that will not be taken into account, so it's optional.

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
serverCommunardo JIRA
serverId
c0db702e
40ebf4e9-
3cc3
af73-
3d25
381d-
9da5
8ee9-
272ed3ba7af5
1907c74966d1
keySUPPORT-5253