Confluence document Expiration date

Is it possible to add an expiration date or define a date for a document to be review? For example I create a document but want to make sure this document is review every 3 month. Thank you

2 answers

1 accepted

1 vote
Accepted answer

This plugin seems to do some of what you're asking:

I don't have easy access to the marketplace so I have to use home grown solutions as much as possible.

I used the Page properties macro, with a Page Properties ID of exp. (Hide or don't hide depending on whether or not you want to see the expiration date on your page.)

In the body of the macro, I created a 1 row, 2 col table with the left column the header and the heading Expires.

Finally I put the Label exp on each page.


Next create a page and include the Page  properties report macro with the Label exp, in the Current space (or wherever) with the Options: Page properties ID exp and Sort by Expires.


This will produce a report showing the page titles (and links to them) and expiration date, with the most recent expiration dates at the top.


It doesn't highlight pages older than a given date but that's pretty easy to manage in your head and this solution is free.


I also wanted to alert page visitors to the fact that the content had expired (or was soon to) so I created a macro based on one by Fermo Siegwart's Date Countdown macro.


Macro Name: pageexiirationtimer

Visible: all

Macro Title: Page Expiration Timer

Description: Counts down the number of days until the page expiration date.

Macro Body Processing: Unrendered


## Macro title: Page Expiration Timer

## Macro has a body: Y (can contain instructions to user in the event the doc is expired.)

## Body processing: optionally display email address for author/editor and instructions.

## Developed by: John Corwith, adapted from Femo Siegward Date Countdown macro

## Date created: 07/12/2016

## This user macro counts down the number of days until the page expiration date.

## @param endDate:title=Page Expiration Date|type=date|required=true|desc=Format: mm/dd/yyyy

## @param displayCountdown:title=Display Countdown Banner|type=boolean|default=true|desc=Permits the countdown banner to be hidden until the expiration date.

## @param contentType:title=Page Content Type|type=string|required=true|desc=Page/Instructions/Wiki/...

## @param notifyText:title=Email Link Text|type=string|required=false|desc=Notify Administrator/Email/Report Expired Page/... (requires Email Address below)

## @param email:title=Email Address|type=string|required=false|desc=DL or email address (requires Email Link Text above)


## declare variables and initialize with current date

#set ( $endDate = $content.currentDate)

#set ( $currentDate = $content.currentDate)


## parse endDate param to milliseconds and set as time of endDate variable




#if($paramdisplayCountdown == "true")

## currentDate is before endDate => calculate days remaining

#set ( $daysRemaining = ($endDate.getTime() - $currentDate.getTime()) / 1000 / 2600 / 24 )

<div class="aui-message success">

<big><big>$paramcontentType expires in $daysRemaining days on $action.dateFormatter.format($endDate).</big></big>




## currentDate is after endDate

<div class="aui-message error">

<big><big>$paramcontentType <strong><font color="red">Expired</font></strong> on $action.dateFormatter.format($endDate).</big></big>


## optional link to email for concerning expired page

<a href="mailto:$paramemail?subject=$renderContext.getPageTitle():$paramcontentType has EXPIRED&body=$action.getGlobalSettings().getBaseUrl()$content.geturlPath()">$paramnotifyTExt</a>


## macro body can optional contain instructions for the user in the event the page has expired




Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

118 views 3 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you