Summary
This supplier provides key values for Confluence Spaces.
 | All key names are case-sensitive. That is, you must use "id" rather than "ID" |
Details
| Name: |
Space Supplier |
| Prefix: |
space (optional) |
| Supported Content: |
Confluence spaces |
| 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 | Space | Text | The name of the space. |
| key | Space | Text | The space key. |
| type | Space | Text | The type name for the space ("Space"). |
| url | Space | Text | The server-relative URL for the space. Will generally direct the user to the space homepage. |
| creator | Space | User | The user who created the space. |
| creation date | Space | Date | The date the space was created. |
| modifier | Space | User | The user who most recently modified the space. |
| modification date | Space | Date | The date the space was most recently modified. |
| icon | Space | Text | The server-relative URL for the space's icon. |
| homepage | Space | Page | The page which is the homepage for the space. |
| description | Space | Space Description | The space description for the space. |
| is personal | Space | Boolean | Tests if the space is personal (is attached to a user). |
| is global | Space | Boolean | Tests if the space is global (that is, not a personal space). |
| all pages | Space | List of Pages | The list of all pages contained in the space. |
| pages | Space | Pages | The list of pages with no parent contained in the space. |
| news | Space | List of News Items | The list of news items contained in the space. |
| orphaned pages | Space | List of Pages | The list of pages in this space which are not linked to by any other content. |
| undefined pages/undefined links | Space | List of Links | The list of links to pages which have links defined, but for which no actual page has been created. |
| labels | Space | List of Labels | The list of labels attached to this space. |
| labels in content | Space | List of Labels | The list of labels attached to content contained in this space. |
| space type | Space | Text | The name of the space type (Personal/Global). |
| is favourite | Space | Boolean | Is true if the current user has marked the space as a favourite.
(since v. 1.0.1) |
| mail | Space | List of Mail | The list of mail items in this space. (since v 3.0.0) |
Related Suppliers
Attachment Supplier,
Comment Supplier,
Content Supplier,
Mail Supplier,
News Supplier,
Page Supplier,
User Supplier
Related Recipes
Space Labels Recipe,
Space list recipe
Examples
List all labels for all spaces.
no worries. awesome plugin. you can delete the previous comment too.
Is there anyway to do category headings? I can't find a macro or example that does that. for example, list all pages for all labels in all spaces, separated out by SPACES, generating a table for each space.
Space 1
Space 2
Yeah, easy - just put a standard heading marker in front of the {report-info}. Eg:
{report-block} {space-reporter:space=@all} {text-sort:space:title} {space-reporter} {report-body} h2. {report-info:space:title|link=true} {report-info:space:labels for content} {report-body} {report-block}Thanks for the suggestion of using h1. It's not quite what I was hoping for. Here is the code I'm working on. Two issues: tables generated are non-contiguous, and I can't get 'space' headings for each section. Can I do nested reports? (i.e. for each space, render this AND generate a report for each label?)
h3. List all content for all labels in given spaces {cache:showRefresh=true} {report-block:output=wiki} {space-reporter:space=test} {expand-on:space:labels in content|as=label} {text-sort:label:title} {expand-on} {space-reporter} {report-body}| {report-info:expanded:item > space:title|link=true} | {report-info:expanded:label > label:title|link=true} | {report-info:expanded:label > label:content count} | {report-info:expanded:label > label:content|link=true} |{report-body} {report-block} {cache}I should say, this is a test, and I would replace space=test with space=@global or space=help,wiki,test,etc
Oh yeah, of course. You can nest {report-table} inside {report-block} and {report-list}, and vice-versa, but, you can't nest {report-block} inside {report-list}, due to Confluence not allowing nested macros. I have a workaround in mind for a future version, but it's still hack.
But to answer your query, try something like this:
h3. List all content for all labels in given spaces {cache:showRefresh=true} {report-block:output=wiki} {space-reporter:space=@all} {text-sort:space:name} {space-reporter} {report-body} h2. {report-info:space:title|link=true} {report-table} {local-reporter:space:labels in content} {text-sort:label:title} {local-reporter} {report-column:title=Label}{report-info:label:title|link=true}{report-column} {report-column:title=#}{report-info:label:content count}{report-column} {report-column:title=Content}{report-info:label:content|link=true}{report-column} {report-table} {report-body} {report-block} {cache}I've added the example as a recipe (here), which should link to the local-reporter, Reporting Plugin and this page, amongst others.
I'm glad you like it. It is the most complex plugin to actually use that we have, I'd say (Scaffolding would be a close second), and somewhat difficult to document effectively. I've tried to put examples in the Recipe Book, but I think most people miss them...
Seems that space:name and space:description return the same string: the space name
Actually, space:description is a ContentEntityObject (more specifically, a SpaceDescription object). The reason they look like the same thing is because report-info will attempt to convert any non-text object into a text value, and the default value for a ContentEntityObject is its title. Which in the case of SpaceDescriptions, is the title of the space the description belongs to.
To get what you're after, try this instead:
{report-info:space:description > content:body|render=wiki}Thanks so much. That works fine.
Hi, I'm new to reporting, I cannot figure out how to pull a list of spaces by a label common to given spaces. I'm using confluence 2.5.6, Im not getting how to filter information or even use the keys above.
I'm thinking I need to put the filtering logic in the space-reporter block, but nothing I've tried works. The Spaces all have the right team label, oh wait. Team labels must be a new feature? Not supported yet? I also tried to set and use 'labels' on the space, still didn't work.
Anyone shed some light?
{report-block} {space-reporter:labels=segmentcouncil} {text-sort:space:name} {space-reporter} {report-body} (*b) {report-info:space:title|link=true} {report-body} {report-block}Theres a recent thread on atlassian on this topic...
Is there anything new on this?
I need to locate spaces with a given label, then locate pages within those spaces. For the latter part I'll use scope or labels, but for the time being I'm stuck just trying to locate the spaces.
I've tried:
{report-block:output=wiki} {space-reporter:label=§wikivastuu_infe} {text-sort:space:name} {space-reporter} {report-body} h2. {report-info:space:title} {report-body} {report-block}and:
{report-block:output=wiki} {space-reporter:space=@global} {text-filter:space:labels|include=§wikivastuu_infe} {text-sort:space:name} {space-reporter} {report-body} h2. {report-info:space:title} {report-body} {report-block}No results. What am I not getting?
I checked http://forums.atlassian.com/message.jspa?messageID=257250785 but that was singularly unhelpful.
Confluence 2.5.7 and Reporting Plugin 1.3.2
r. Ville
Hi....
I was trying to retrieve the spaces names based on its label and after getting those label specific spaces then retrieve all the pages based on a particular label.
I need a solution how to make a loop of spaces which i can retrieve on its space label. All i need is to put in a chart for chart creation.
I know that i can use the following macro as follow to get the label specific spaces
{report-block:separator=pipe} {space-reporter:spaces=@global} {text-filter:space:labels\|include=.*infosys.*} {text-sort:space:key} {space-reporter} {report-body} {report-info:space:key\|link=true} {report-body} {report-block}But with what kind of macros i can get into each space retrieved by the space-reporter macro or report-body macro?
I've been on leave for a month, so my memory is a little hazy, but I believe there was a bug with label checking on spaces which I fixed, but didn't have time to release.
In the meantime, try modifying your text filter to this:
{content-filter:space:description|label=+infosys}Space labels are actually added to the space description object, so checking for labels on the description should do the trick. The next version of Reporting should make it simpler to check for space labels, however.
First of all, I'm pretty new to this wiki thing. That being said, I'm wondering if I can nest reports to in effect create a list of children pages and the attachments within those pages.
e.g.:
Thanks!
-Ryan
Hi Ryan,
Ideally, you would nest two {report-list} macros, but unfortunately, due to restrictions with Confluence's parser, that doesn't work. One workaround is to create a couple of User macros, one to display the list of attachments on the current page, the other to display the list of child pages. Eg:
User Macro 1: {attachment-list}
{report-list} {local-reporter:content:attachments} {report-body}{report-info:content:title|link=true}{report-body} {report-list}User Macro 2: {child-list}
{report-list} {local-reporter:content:children} {text-sort:content:title} {local-reporter} {report-body}{report-info:content:title|link=true}{report-body} {report-list}Then, just call {child-list} in your parent page, and you're good to go.
{local-reporter:space:restricted pages} {local-reporter}is there any way by which we can get the restricted pages within the space in the report?
Not currently. Please create a feature request to have it added in a future version.
Hi
I'm trying to get lists of users (ids and names) that have edit/view/remove permissions on pages in the current space. Looking at the suppliers, this isn't supported. Correct?
Thank you
Hamish
Well, not directly, but you can actually use the user-reporter for this. Eg:
{user-reporter:space=@self > edit} {text-sort:user:full name} {user-reporter}That will display users which can edit pages in the current space. You can also specify 'view'. I don't think 'remove' permission is currently checkable.
Thank you very much. I did look around before raising the question - and I very much appreciate the answer!
The code below works fine on my staging server (which only has a few logins) to get the users with edit privileges. However if I run it on our live server (with 10s of thousands of accounts) the page never saves. In fact, as we speak I think the server has crashed
{report-block:maxResults=5} {user-reporter:space=@self > edit} {user-reporter} {report-body} {report-info:user:full name|link=true} {report-body} {report-block}I think that maybe the supplier opens every single account. I couldn't reasonably expect this to ever work because all searches will necessarily look at all accounts.
Does that seem reasonable analysis?
Regards
Hamish
Being able to report on a space's templates would be noice
The best way to get this into the plugin is to create a feature request. It would be good if you could add some example use cases also, so that what is built meets your needs.
I've a bit of an odd problem. My client has a confluence space that is used to describe features of their products. Most of the features are generic across the entire product line.
However, some features are specific to some products. The client would like to put the product specific feature descriptions in their own space (one space per product) under the same page name
as the generic feature description. I'd like to use reporting to include those product specific descriptions on the generic feature description page after the generic text. The
result would be something like this...
------------------
Flux Capacitor
The flux capacitor is the key component to any time traveling machine.
DeLorean
On the DeLorean, the flux capacitor is located on the rear firewall behind the driver and passenger seats.
Locomotive
This steam powered time machine uses a flux capacitor of a slightly different variety.
-----------------
In this example, there would be a "DeLorean" space and a "Locomotive" space, each with "Flux Capacitor" page, along with the generic "Flux Capacitor" page in a "Features" space.
So, I want to create a report that includes all pages contained in other spaces (that have a given space label) that have the same title as the current page.
I've tried a couple of different approaches..
{report-block} {content-reporter:spaces=-@self|type=page} {text-filter:content:title|include=page name} {content-reporter} {report-body} h2. {report-info:content:space} {report-info:content:body} {report-body} {report-block}Of course, this is horribly slow because the content reporter is iterating through all of the pages in other spaces, and not too nice either because I have to know the name of the
current page for use in the text-filter include. There's no way to use something like @self:title here, I think. Is there a better approach?
I was thinking of working out how to iterate through the spaces using the space-reporter, and then use a local reporter and space supplier to get the pages from that space.
Am I missing something, or is there simply not an easy way to do this?
Hi Guy,
I had a brief look into this and indeed it is a odd problem.
I do agree that getting all pages from all other spaces will have performance hit on your system.
There is no immediate recipe i can think of to do it better but i will keep you posted when i do find a appropriate recipe.
Alternatively, it is possible to extract and display the data you described in your post with a custom plugin.
Thanks for looking into it. I may try writing the plugin myself.