{version-history} Macro
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.
Add the macro to your page as follows:
{version-history:page=Home|dateFormat:ddMMYY HHmm|reverse=true|first=5}
Parameters
| Parameter | Required | Notes |
|---|---|---|
| page | 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 |
This software is released under a BSD License
This macro has been tested by Adaptavist with Confluence 2.1.2
It is usually pre-installed when using our Host service. To install it on your own Confluence installation, please see Footnotes Plugin
Adaptavist maintain a JIRA Project for tracking bug reports and feature requests for this macro. The currently reported items are shown below:
- page-info macro
- [USERGUIDE:change-history macro]
Examples
Displaying the current page's history
{version-history}
Which produces a table displaying version information about the current page:
Version
Date
Author
Comment
20
Aug 18, 2010 16:34
Robin Crorie
19
May 11, 2009 22:42
Alain Moran
18
Apr 26, 2009 18:39
Guy Fraser
17
Jul 21, 2008 19:10
Guy Fraser
16
Jul 21, 2008 19:08
Guy Fraser
15
Jul 21, 2008 19:06
Guy Fraser
14
Jan 10, 2007 17:47
Alain Moran
13
Jun 15, 2006 02:15
Guy Fraser
fixed issue tracker url
12
Mar 29, 2006 10:37
Guy Fraser
adding link to change-history macro (not yet documented)
11
Mar 29, 2006 10:33
Guy Fraser
Fixing links to date formats tutorial
10
Mar 24, 2006 00:03
Guy Fraser
9
Mar 23, 2006 18:30
Alain Moran
8
Mar 23, 2006 14:54
Alain Moran
7
Mar 23, 2006 14:54
Alain Moran
6
Mar 23, 2006 14:46
Alain Moran
Date formatting
5
Mar 23, 2006 14:42
Alain Moran
4
Mar 23, 2006 14:32
Alain Moran
Displaying the version data for a different page
3
Mar 23, 2006 14:27
Alain Moran
Reversing the order of items displayed
2
Mar 23, 2006 14:24
Alain Moran
Limiting the number of items displayed
1
Mar 23, 2006 14:21
Alain Moran
Limiting the number of items displayed
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
Version
Date
Author
Comment
20
Aug 18, 2010 16:34
Robin Crorie
19
May 11, 2009 22:42
Alain Moran
18
Apr 26, 2009 18:39
Guy Fraser
Reversing the order of items displayed
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.
Version
Date
Author
Comment
1
Mar 23, 2006 14:21
Alain Moran
2
Mar 23, 2006 14:24
Alain Moran
Limiting the number of items displayed
3
Mar 23, 2006 14:27
Alain Moran
Reversing the order of items displayed
Displaying the version data for a different page
At times it may be useful to display the version history for a different page
{version-history:page=Home|first=3|reverse=true}
The following table details the three most recent revisions made to the Home page in this space
Version
Date
Author
Comment
1
Jul 21, 2008 18:31
Guy Fraser
2
Jul 22, 2008 05:16
Guy Fraser
3
Aug 11, 2008 22:12
Guy Fraser
Setting the date format
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.
{version-history:first=3|dateFormat=dd MMMM yyyy, hh.mm aa}
As can be seen below:
Version
Date
Author
Comment
20
18 August 2010, 04.34 PM
Robin Crorie
19
11 May 2009, 10.42 PM
Alain Moran
18
26 April 2009, 06.39 PM
Guy Fraser
Hints and Tips
None at present.
Frequently Asked Questions
None at present.


Comments (5)
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