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 |
---|
title | The current month (example: November) |
---|
|
birthday: *-11-* |
(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.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. |
Related Articles
Filter by label (Content by label) |
---|
showLabels | false |
---|
spaces | KB |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label = "user-profiles-confluence" and type = "page" and space = "KB" |
---|
labels | user-profiles-confluence profile-list macro |
---|
|
Page Properties |
---|
|
Verwandte Vorgänge | Jira Legacy |
---|
server | Communardo JIRA |
---|
serverId |
---|
|
|
---|
c0db702e3cc33d259da5272ed3ba7af51907c74966d1 | key | SUPPORT-5253 |
---|
|
|
|