The {version-history} macro allows you to display a table detailing the changes that have been made to the page...
Although this information is already available elsewhere, it is often useful to display it on the page itself. The macro is ideal for formal documentation as it allows you to quickly add a self-updating version history of the page that will be present in printouts. Furthermore, the table displays edit comments alognside each version.
The name of the page whose version history you wish to display, if none is given then the current page is assumed. (@self and @parent are also valid)
dateFormat
Allows you to override the format used to display dates. Details of the pattern syntax may be found Date Formats. If omitted, the date format defined in Confluence General Configuration will be used.
reverse
Whether to reverse the list (sorted in revision order)
first
Only display the first x entries
Examples:
Displaying the current page's history
{version-history}
Which produces a table displaying version information about the current page:
On pages that are frequently edited there may be far too many entries in the version history to conveniently display all of them, you can limit the number of entries displayed using the first parameter
{version-history:first=3}
Which produces a table containing limited to displaying three entries
By default the versions listed are sorted into oldest to newest version (first revision to most recent revision), often you may wish to reverse this order, especially when using the first parameter since this can give you a list of the most recent changes to a page
{version-history:first=3|reverse=true}
Which displays a table containing the three most recent modifications to their page.
You may also wish to set the format that the date appears in, this can be done using the format parameter. Details of the syntax for the format definition can be found Date Formats.
comment from
sruiz at redredesign dot com:
this is a great plugin.. we are us...
comment from
sruiz at redredesign dot com:
this is a great plugin.. we are using it now... one of the things that we are hearing is that it would be great to provide a method where a link to a rev (rev 1 in our case) to some text.. i.e.:
where you could have text such as..
"View Rev. 1" and have that text link to the first rev..
Hi has anyone encountered Error formatting macro: version-history: java.lang.Nul...
Hi has anyone encountered Error formatting macro: version-history: java.lang.NullPointerException when the version-history tries to show changes made by a user that no longer exists?
We hook up to Active Directory but the plugin doesn't seem to cope with accounts deleted.
It would be great if it fell back to the username if it can't find information about the user.
Comments (6)
May 02, 2006
Anonymous says:
comment from sruiz at redredesign dot com: this is a great plugin.. we are us...comment from
sruiz at redredesign dot com:
this is a great plugin.. we are using it now... one of the things that we are hearing is that it would be great to provide a method where a link to a rev (rev 1 in our case) to some text.. i.e.:
where you could have text such as..
"View Rev. 1" and have that text link to the first rev..
thanks for all your great work...
Jan 16, 2007
Anonymous says:
A useful feature would be to only show one revision per day - because otherwise ...A useful feature would be to only show one revision per day - because otherwise the table becomes huge when there are several saves per day.
Apr 26, 2009
Herman de Boer says:
Hi, A typo I think, at the description of the dateFormat notes: "when do dat is...Hi,
A typo I think, at the description of the dateFormat notes:
"when do dat is to be ".
Regards, Herman.
Jun 17, 2009
Melanie Kubik says:
How can I make version history, a menu item? Once clicked on, it takes you dire...How can I make version history, a menu item?
Once clicked on, it takes you directly to the version history page. Page information has way too much information.
Would this be done by a compound menu item? Menulink? I´ve having trouble with the coding...
Thanks,
Melanie
Jan 05, 2010
Christian Aliaga says:
When I put the value 10 for the parameter first:10 causes an error:Error formatt...When I put the value 10 for the parameter first:10 causes an error:Error formatting macro: version-history: java.lang.NullPointerException
Feb 17, 2011
Mark McAulay says:
Hi has anyone encountered Error formatting macro: version-history: java.lang.Nul...Hi has anyone encountered Error formatting macro: version-history: java.lang.NullPointerException when the version-history tries to show changes made by a user that no longer exists?
We hook up to Active Directory but the plugin doesn't seem to cope with accounts deleted.
It would be great if it fell back to the username if it can't find information about the user.
Thanks,
Mark.