{space-reporter}
Plugin: Reporting Plugin, from version 1.0
Reports on Confluence Spaces.
Description
This macro must be used within a report of some type (e.g. report-block or report-table). It will only list spaces visible to the current user. Also, further filtering can be made by specifying the 'spaces' parameter, or using custom filters.
Usage
Parameters
| Name |
Required |
Default |
Description |
| space(s) | | @all | The list of spaces to search in. Each space may be prefixed by either '+' (to indicate the space is required) or '-' (to indicate the space must be excluded). May be one of the following:
- @self - The space the current content is in.
- @personal - Personal spaces only.
- @global - Global spaces, that is, non-personal spaces.
- @all - All spaces, both global and personal
- SPACE KEY - Any other space key may be specified explicitly.
|
| label(s) | | | List of label checks. Eg. "one, +two, -three" would list content which had the "two" label but not the "three" label. |
| matchAll | | true | If set to 'false', content matching any of the criteria will be returned. Otherwise, the content must match all criteria. |
Recipes
See Also
I want to show a list of all spaces, sorted by the creation date. But this doesn't work (the result is mixed):
{space-reporter} {date-sort:space:creation date} {space-reporter}Any hint?
There was a bug with date-sort which was fixed in the latest version of the plugin. Which, from your other post, you are not yet using, since you are still running on Confluence 2.2. Since we don't have the resources to maintain the plugins for older versions, I'd strongly suggest upgrading as soon as possible.
That said, avoid Confluence 2.6 for the moment - I'm pretty sure the current versions of many plugins will break. Your safest bet is Confluence 2.5.4.
Hi David,
Thanks for the hint. Our version is too old at the moment (2.2.9). But we are going to upgrade to 2.5.4 (thanks again for the "avoid.." hint)
Another idea or proposal:
Select only users favourites spaces:
{space-reporter:space=@favourites}
Select only public spaces (anonymous access):
{space-reporter:space=@anonymous}
Kind Regards
Stefan
Hi Stefan,
Thanks for the suggestions. For the record, the best way to create feature suggestions is to add them to JIRA so they get processed for the next version.
Also, there is a way to filter to only favourites. Try this:
{space-reporter:space=@all} {boolean-filter:space:is favourite|value=true} {space-reporter}That should do the trick. But there isn't really anything for listing spaces with specific permissions, such as anonymous access.
Hi David,
is it possible to create a report which lists pages grouped by all other labels which are related to a given label. at best with the according label being headlined for each list?
this is my code, for listing pages filtered by a label. but it would be nice not to code it manually for each label...
{report-list:depth=all} {content-reporter:space=@self\|label=schaltgetriebe} {date-sort:content:creation date} {content-reporter} {report-body} {report-info:content:title\|link=true} - {report-info:content:excerpt} {report-body} {report-list} Thanks a lot,
Cheers, Robert
There isn't really anything which lets you start with a label presently, ala a {label-reporter} or similar. Theoretically, once you have a label, you can get the list of related labels like this:
{report-info:label:related}But you'll need some kind of label finder first. The best thing would be to create a feature request so that it might get done in the next version.
{date-sort:content:creation date|order=descending} as well as {date-sort:content:creation date|order=ascending}It gave me same results for both. is it a bug?? Can you help me on that??
Thanks,
Nikunj Jariwala
I seem to recall there was a bug with date-sort in an older version of Reporting. What version are you using?
I have a overview page which is already labeled with the label I want to search for related labels.
Does this help? With the label supplier I can get the related labels. Now I need a loop which creates foreach related label a list of pages...
As you say, it's still a pain accessing the specific label you want to start with. Assuming you can get it, you can use the 'label:related' list and create a report on that using local-reporter. Eg:
{report-block} {local-reporter:content:labels} {text-filter:label:title|include=label_name} {local-reporter} {report-body} {report-table} {local-reporter:label:related} {local-reporter} {report-column:name=Title}{report-info:label:title|link=true}{report-column} {report-column:name=Pages}{report-info:label:content|linke=true}{report-column} {report-table} {report-body} {report-block}Updated by David Peterson
Jan 31, 2008 16:51
I am trying to create a new dashboard where the spaces are listed by category. Categories will be set using the Space Labels. But I cannot get the {space-reporter} to filter itself based on label. What am I doing wrong? Code below...
{report-block:output=wiki} {space-reporter:space=@global\|label="retired"} {text-sort:space:name} {space-reporter} {report-body} h6. {report-info:space:name\|link=true} ({report-info:space:key}) {report-body} {report-block}Never mind, just realised I can edit your post myself
I believe the problem is a known issue with space-reporter, which is due to be fixed in the next version of Reporting. See here for more details.
Correct me if i am wrong. But this code is including spaces which were already deleted.
how to get rid of those spaces??
To my knowledge when you delete a space it is removed from the database. The only way they would be being reported would be if the indexes still contain references to them. Try reindexing your server (Administration > Content Indexes).