Summary
Provides information about Confluence Users.
Details
| Name: |
User Supplier |
| Prefix: |
user (optional) |
| Supported Content: |
Confluence Users |
| Provided By: |
Reporting Plugin |
Keys Supported
The following are the list of keys which this supplier will return a value for.
| Key |
Content Types |
Return Type |
Description |
| name | User | Text | The user's unique username or user id. |
| full name | User | Text | The user's full name. |
| url | User | Text | The server-relative URL for the user's homepage/profile. |
| email | User | Email address/Text | The users email address.
Note: If Confluence is set to obscure or hide the address, it will not be displayed to non-administrators. Also, the address will only be an Email address if the address is valid. Otherwise it will be Text or empty. |
| picture | User | Text | The URL pointing to the user's personal profile picture. |
| labels | User | Labels | The list of personal ("my:label") labels created by the user. Note: This is only displayed to the user themselves. |
| personal space | User | Space | The user's personal space, if they have one. |
| groups | User | List of Groups | The list of groups the user is a member of. Note: This is only available to the user themselves and administrators. |
| is deactivated | User | Boolean | Tests if the user is deactivated. |
| is removable | User | Boolean | Tests if the user is removable. |
| personal information | User | Content | Returns the user's personal information content, the most interesting parts being the 'content:body' and 'content:attachments'. (Since Reporting 1.1.1) |
| authored pages count | User | Number | The number of pages authored by the user. (Since 1.1.1) |
| authored pages | User | List of Pages | The list of pages authored by the user (Since Reporting 1.1.1) |
| favourite spaces | User | List of Spaces | The list of spaces marked as a favourite by the current user. (Since Reporting 1.3) |
| favourite content | User | List of Content | The list of pages/news items/etc marked as a favourite by the current user. (Since Reporting 1.3) |
| signup date | User | Date | The date the user registered.
(Since 2.1.0) |
| last login date | User | Date | The date the user last logged in.
(Since 2.1.0) |
| recently modified content | User | List of Content | A list of content that has been recently modified by the user, with the most recent modifications listed first.
(Since 2.1.0) |
Related Suppliers
Comment Supplier,
Content Supplier,
Global Supplier,
Label Supplier,
Reference Supplier,
Space Supplier,
User Group Supplier
Related Recipes
User contact cards
Hi,
i would like to make a list from all pages marked as favourite by a user from a particular space.
I tried but this gives me a empty list:
{report-list} {space-reporter:space=tools} {content-filter:user:favourites content} {space-reporter} {report-body} {report-info:content:title\|link=true} {report-body} {report-empty}{report-empty} {report-list}Try something like this instead:
{report-list} {local-reporter:user:favourite content} {content-filter:@self|space=tools} {local-reporter} {report-body}{report-info:content:title|link=true}{report-body} {report-list}Thanks for the quick reply. Unfortunatly it doesn't work.
{report-list} {content-reporter:user:favourite content} {content-reporter} {report-body}{report-info:content:title\|link=true}{report-body} {report-list}When i try this code above it generates a list from all content on the current space. Attachments, mails, pages, news etc. Regardless if they are favourites or not.
some additional info:
If i use local-reporter without filter, it gives me an empty result too.
So mayb theres something wrong with the favourite content list from the User Supplier?
Is there any way of getting the user registration date into a report? (I'm guessing not, as it would be listed above.)
I don't think so at present. It looks like Confluence does store that information somewhere however, so it could probably be added fairly easily if I can figure out where. Please create a feature request if you'd like to see it added in a future version.
Thanks David.
I am trying to display information about ONE PARTICULAR USER. For example, I want to put a link to the homepage of the personal space of user John Smith (~jsmith) on a page. I want the link to show his profile picture and his full name. How do I do this?
Thanks in advance!
Currently I think you'll have to actually create a report specifying that user. Eg:
{report-block} {user-reporter:user=jsmith} {report-body}{report-link:user:personal space > homepage > url}{report-image:user:picture} {report-info:user:full name}{report-link}{report-body} {report-block}Thanks, David. That worked!
I wanted to get a list of users and when they last logged in. I thought this would be straight forward, but I think I'm missing something.
If I try the following:
{report-table} {report-header} h4. Users and Activity {report-header} {user-reporter} {natural-sort:user:full name} {user-reporter} {report-column:title=User Name}{report-info:user:full name|default=Anonymous}{report-column} {report-column:title=Last Login}{report-info:user:last login date > format=MMM dd, yyyy}{report-column} {report-column:title=Number of Pages}{report-info:user:authored pages count}{report-column} {report-empty} This report is empty {report-empty} {report-table}I get a table that lists the user full name in both the "User Name" column and the "Last Login" column.
If I replace the Last Login column with the following:
{report-column:title=Last Login}{report-info:user:last login date}{report-column}I get nothing in the Last Login column.
I've tried a number of other illogical variations, and all I get is blanks or the user full name again.
Any thoughts?
Hi Helene,
The reason the first example is outputting the name of the user is because the format you're using is incorrect. You don't use 'format=' in the key chain - you just have the date format. The two options are:
{report-info:user:last login date > MMM dd, yyyy}...or:
{report-info:user:last login date|format=MMM dd, yyyy}In the first example, you're using the 'date format' feature of the Date Supplier. In the second, it's using the 'format' parameter of the report-info macro.
That said, there still seems to be a bug since the last login date is always returning 'null', and is doing so in my test cases too. I've created a bug report here - feel free to watch/vote/comment.
Thanks for the syntax correction and the info about the bug.
Hmm see the bug has been fixed, however I'm still getting null returns
Am I being daft somewhere?:
{report-table} {report-header} h1. Users and Activity {report-header} {user-reporter} {natural-sort:user:full name} {user-reporter} {report-column:title=User Name}{report-info:user:full name\|default=Anonymous}{report-column} {report-column:title=Last Login}{report-info:user:last login date > MMM dd, yyyy}{report-column} {report-column:title=Number of Pages}{report-info:user:authored pages count}{report-column} {report-empty} This report is empty {report-empty} {report-table}I'm trying to use replace-and-render and report-info to create a list box containing a list of users selected elsewhere on the page:
I'm using the following as the source field:
{list-data:Team Members|type=check|multiple=true}{user-options:groups=employees}{list-data}
and using the following as the second list box:
{list-data:AL Resource|type=check|multiple=true}{user-options:users=%TeamMembers%}{list-data}
But when I use the following to replace the variable:
{replace-item:%TeamMembers%}{report-info:data:Team Members|render=wiki}{replace-item}
I'm only getting the user full names separated by commas and the user-options needs the actual user IDs - is there any way to use the user supplier on a list of users to achieve the desired effect?
Hi Jon,
I'm not sure I'd recommend this approach, since dynamically generating scaffold options based on other data on the same page will always be slightly out of sync anyway.
The reason it's doing it is because report-info will always output lists of data (such as the 'Team Members' list) by outputting the default value separated by commas (although you can customise the separator). User objects will default do displaying the full name of the user. A way around would be to use the report-on macro instead:
{report-on:data:Team Members|separator=comma}{report-info:reference:value > user:name}{report-on}You need to go via the reference:value key because list-data stores all its values as Reference objects.
David
Thanks - that works great. I understand the issue regarding the data being out of sync, but as the first list will not change that much, it should work fine.
Thanks
Jon
Hi,
Is there a way to display the list of the top 10 contributors per space?
I only manage to get the global list...
Thanks a lot for your help,
Vincent
yes this would be really useful!
yes this would be really useful!
Not currently. Feel free to create a feature request and we'll see what can be done in a future version.
It would be nice if there was a way to get the boolean output of whether the user item is the current user! You could then use this true/false value with a number of other macros by injection.
Not a bad idea. The best way to get new features into plugins is to create a feature request. Would you mind creating on there? That way you will be notified when it is implemented.
I'm trying to generate a simple listing of blog (news) posts. But I can't for the life of me get the creator's name to display! No matter how I try to construct the key chain to get the user's full name, I get no data back. Any ideas?
{include:BoSci CSS} {report-block} {content-reporter:space=@self|type=news} {date-sort:content:creation date|order=descending} {content-reporter} {report-body} h5. {report-info:content:title} Posted on *{report-info:content:creation date}* by {report-info:content:creator > user:full name} {div:class=blogStub}{report-info:content:body > first 500|render=wiki}...{div} Labels: {report-info:labels|link=true} {report-link:url}*Read more...*{report-link} ---- {report-body} {report-block}Your macro markup looks fine - not sure why it wouldn't be displaying.
Perhaps try putting {report-info:content:creator > user:full name} directly onto a blog post body to make sure that Reporting is correctly retrieving creators from blog posts.
It works fine in a new blog post (interesting to note it can be used on its own like that). And it works fine in the code I supplied, if I just say {report-info:content:creator }-- then I get the user name, which I guess is the default text representation of the user object. But trying to retrieve any keys from the User object is what seems to fail.
Hmm. Very odd. Are you using any kind of custom authentication setup? As far as I know it should still work as long as the authenticator extends com.atlassian.user.User, but there could be something weird going on. report-info will default to outputting the 'toString()' value of an object if none of the other suppliers recognises it, so this could be happening I guess...
OK, my bafflement is deepening. In answer to your question, I'm just using a stock Confluence with no fancy authentication.
So if I do this:
{report-on:content:space} {report-info:creator} {report-on}I get the full name of the space's creator. Whereas in the context of the news post, {report-info:creator} got me the name attribute, not the full name. And the above report I could say {report-info:creator > full name} and get the full name that way too.
So there seems to bs something odd about whatever I'm getting back for "creator" on a blog post.
Very odd. Could you please create a bug report with details on where it does and doesn't work, and we'll look into it from there...
OK, I figured it out. The blog posts had been exported from one instance of Confluence and imported into another. Many of the users did not exist in the new system. The user name was preserved, hence the ability to see the name, but all the other attributes weren't.
Once I add the users to the current instance, their data is fetchable.
Confessional debugging for the win!
Awesome. Glad you figured it out
I am trying to setup a simple list of the most recent actions taken by a user -- MY goal is to show something just like the user history that you get form confluence through the top menubar -- but not for the user who is browsing, for a specific user... Maybe there is a much better way to go about this...
but I tried using the user-supplier> recently modified content.. object -- but I am not sure how I iiterate through the list that I get..
{report-block} {user-reporter:user=jrousell} {user-reporter} {report-body} {report-info:user:recently modified content} need to iterate through the above list... {report-body} {report-block}Something like this should do the trick:
{report-block} {user-reporter:user=jrousell} {user-reporter} {report-body} {report-list:maxResults=10} {local-reporter:user:recently modified content} {date-sort:content:modification date|order=descending} {local-reporter} {report-body-1}{report-info:content:title|link=true} ({report-info:content:modification date|format=medium}){report-body-1} {report-list} {report-body} {report-block}Note the 'report-body-1' macro inside the internal report. This is because Confluence's wiki parser can't handle nested macros, so the workaround is to provide numbered aliases.
This is GREAT, but perhaps I'm taking you too literally here. Using {report-body-1} doesn't work. Gives an "unknown macro" error, though it gives the error along with the first item in the list. A little further help please?
You might be using an older version of Reporting. Make sure you're using the latest version - I believe that the extra '-1', '-2' aliases were added in 2.0 or 2.1.
That was exactly the problem, David. We've upgraded to the lastest version of the Reporting plug-in and this works great. Excellent enhancement!
I'm trying to make a contact info page that would display this sort of info:
Each user has this info on their space home page. What's the best way to structure the user home page so I could pull all of this onto a common Contact Info page?Here's what I currently have:
{report-block} {space-reporter:space=@self} {text-sort:space:name} {space-reporter} {report-body} {report-table} {user-reporter} {text-sort: