You use the clear versions tool to clear the version history
of an item.
Before you begin
You must first enable the clear versions tool by adding the
following parameters to the WCM WCMConfigService service
using the WebSphere® Integrated Solutions Console:- connect.businesslogic.module.clearversions.class=com.aptrix.versioncontrol.ClearVersionsModule
- connect.businesslogic.module.clearversions.remoteaccess=true
- connect.businesslogic.module.clearversions.autoload=false
Procedure
- Log in to the portal as an administrator.
- Open the following URL in the browser and specify details
of what history details to clear:
http://[HOST]:[PORT]/wps/wcm/myconnect?MOD=ClearVersions&day=date&month=month&year=year&keep=number_of_entries&restrictOn=item_type&library=library_name&fix=true&preserve_dates=true
- day, month and year
- The version history will be cleared prior to the date specified
in the day, month and year parameters. If no date is specified, then
the date will default to one year before the current date.
- keep
- Specify the minimum number of history versions to keep. For example,
if a version has not been created for over a year, and you specify
to clear all versions more than a year old, but choose to keep the
last five versions, all versions will be cleared except for the last
five versions even though they are over a year old. If a number is
not specified, then the minimum number of versions to keep will default
to 10.
- restrictOn
- Select the item types to run the clear versions tool against.
If no item types are specified, all item types will be processed.
Use the following parameters for each item-type:
- content
- style for presentation templates
- template for authoring templates
- taxonomy
- category
- SiteArea
- Workflow
- WorkflowStage
- WorkflowAction
- Cmpnt for components
- library
- Enter a library name. If the library parameter
is omitted, the default library that has been configured in the WCM
WCMConfigService service using the WebSphere Integrated Solutions Console.
To run this tool
against all libraries you instead use &alllibraries=true.
If you have a large number of libraries, this may take a long time
to run, so it may be better to run this tool against individual libraries
instead of all libraries.
- fix
- If omitted or set to false, a report listing which versions will
be cleared is displayed. If set to true, versions will be cleared
as specified.
- preserve_dates
- If set to true, the last modified date of items updated by the
module is preserved. If omitted or set to false, the last modified
date is not preserved.
Results
Note: You cannot completely clear all versions. One version
of an item will always remain no matter what parameters you select
when clearing the version history.
Running the tool on a virtual portal
There
are two methods available when running the tool on a virtual portal:
- Using the URL context of a virtual portal:
- If your virtual portal has a URL context, you can add this to
the URL
http://[HOST]:[PORT]/wps/wcm/myconnect/[url_context]?MOD=ClearVersions
- Using the hostname of a virtual portal:
- If your virtual portal has a hostname you can add this to the
URL
http://[Virtual_HOST]:[PORT]/wps/wcm/myconnect?MOD=ClearVersions