Versioning is another SharePoint feature that is relatively easy to grasp. Simply put, versioning
is a feature that allows you to store multiple revisions or copies of a
particular item within a document library or list. An example can
illustrate how exceptionally useful this is for end users.
Types of Versioning
Versioning is a central
feature of the SharePoint platform that you can use with any document
library or list. Versioning is enabled for some of the out-of-the-box
document libraries, such as the Pages library that is created in the
top-level site where the SharePoint Server Publishing Infrastructure is
active. With most document libraries and lists, though, you must
explicitly enable versioning.
Although
“versioning” has been used as a singular term thus far, versioning
actually exists in two different forms within SharePoint:
Major versioning.
This type of versioning is available for use on both document libraries
and lists. Each time an item in a list or document library is edited,
updated, or changed in some way, a new version of that item is created
when it is put back into the list or document library. Version numbers
begin at 1 and increment by 1 for each new version that is stored in the
list or document library. The initial version of an item is version 1,
the second is version 2, the third is version 3, and so on.
Major and minor (draft) versioning.
This type of versioning is available only on document libraries and
other libraries based on them, such as Picture Libraries. It is not
available on lists. This type of versioning extends the major versioning
approach just described with the addition of draft versions that are
denoted by a “point” version number. For example, a document may be
initially uploaded into a document library as version 1.0. As changes
are made to the document, drafts of the document may accumulate as minor
versions: 1.1, 1.2, 1.3, and so on. Once the revision process is
complete and another version is ready for general viewing or usage, the
version number is incremented to 2.0. Major version numbers (1.0, 2.0,
and so on) denote published versions, whereas minor versions (1.1, 1.2,
2.1, and so on) denote minor or draft versions.
Versioning Benefits
Figure 1 illustrates a document library for which major and minor versioning is active. In the figure.
Selecting the Version History menu item from the drop-down selection
menu opens the Version History dialog box shown in Figure 2.
Several
benefits are afforded by versioning regardless of the type of
versioning that is in use or whether versioning is enabled on a list or
library:
Version history.
The Version History dialog box is the primary point of interaction when
viewing and working with item versions. Each time an item is changed, a
new version is created. As demonstrated in Figure 12.10, each of the versions that are available for a given document or list item is clearly shown.
Auditing and change tracking.
Along with the version numbers, the Version History dialog box makes it
clear when an item was modified and by whom. The size of the item is
also noted, along with any comments that were supplied by the individual
creating the version. As long as good comments were supplied when the
version was created, it can be a snap to locate a version or revision of
interest.
Management of versions.
The Version History dialog box also affords you the means to manage the
current item version and those that are historical, either individually
or as a group. As shown in the open drop-down menu for version 1.2 in Figure 12.10,
you can view the item as it existed in version 1.2 or delete that
version of the item altogether. You can also replace the current version
(2.0, in this case) with a historical version, although the term
“replace” is a bit inaccurate. If you elected to replace version 2.0
with the selected version (1.2) shown in Figure 12.10, a version 2.1 would be created with the contents of version 1.2. Version 2.0 would not actually be replaced or overwritten. Figure 3 illustrates the results of such a replacement operation.
From an
end user disaster recovery perspective, the biggest benefit that
versioning gives users is the ability to “roll back” to a previous
version of a document if the current version includes changes or
differences that aren’t desired. When a user can roll back to a previous
document or item version, it is one less call that he’s placing to you
for an item-level recovery.
Administrative Concerns
Versioning is controlled on a
per-list/library basis. Because lists and libraries are managed within
the confines of a site collection, there isn’t a whole lot that you, as a
SharePoint administrator, need to worry about in terms of farm-wide
impact as long as you employ site collection quotas to limit the
consumption of content database storage.
As you might imagine, though,
the use of versioning does increase storage consumption. Each time a new
major or minor item version is added to a list or library, another copy
of that item is created.
A total of six versions for the document exist: 1.0, 1.1, 1.2, 1.3,
2.0, and 2.1. Each of the versions consumes roughly 185KB, so even
though the active 2.1 version is only 184KB in size, the total storage
space consumed by all versions is more than 1MB.
For lists and libraries in
which collaboration activities are used heavily, the overhead of
multiple versions can quickly add up, consume storage, and push a site
collection size toward its allocation limit on storage space as defined
by its quota. Fortunately, SharePoint provides a “maximum number of
versions retained” mechanism that provides some degree of control over
the extent to which item and document versions may impact your overall
site collection storage profile.
Configuring Versioning
The
example that follows demonstrates how to enable versioning on a document
library called Book Chapters at the root of a fictitious SharePoint
team site with a URL of http://spdev:18480/.
In addition to enabling versioning, the maximum number of versions that
can be stored for each document in the library are specified.
If you attempt this walk-through
on a SharePoint site of your own, ensure that your account possesses a
minimum permission level of Contribute within the site housing the
document library.
Open a browser and navigate to the site’s URL of http://spdev:18480/. If you intend to follow along in your own environment, substitute this URL with the URL of a team site in your environment.
Depending
on the configuration of your client browser and the Web application
housing the site, you may be prompted to log in. If you are so prompted,
supply both your username and password. In most cases, your username
and password are your domain login credentials.
When
the team site loads, you are greeted with the default page. Under the
Libraries heading in the quick launch menu along the left side of the
screen is a Book Chapters link. Click the link to take you to the Book
Chapters document library shown in Figure 4.
By
default, the Browse tab is selected near the top of the document
library. Before you can begin configuration, click the Library tab under
the Library Tools grouping. This displays the Documents Library
Settings ribbon shown in Figure 5.
The
actual contents of the ribbon and how they are presented depend on the
width of your browser window. The link of interest on the ribbon is near
the right side, though, and it is called Library Settings. When you
have located it, click the link to bring up the Document Library
Settings page for the library.
Under
the General Settings category along the left side of the main area is a
link titled Versioning Settings. Click the link to display the
Versioning Settings page shown in Figure 6.
By
default, the Document Version History indicates that No Versioning is
in use. To begin using versioning within the document library, select
either Create Major Versions or Create Major and Minor (Draft) Versions.
The latter tends to be the more useful form of versioning when tracking
documents, so select it.
Once
you select the Create Major and Minor (Draft) Versions option button,
the version retention check boxes and text boxes just below it become
active. The check boxes and text boxes provide a way to control the
total number of retained versions. Set the first check box and text box
for major version retention to appear, as shown in Figure 7.
With these values in effect, ten major versions (1.0, 2.0, and so on)
are available at any given time. Once version 11.0 is placed into the
document library, version 1.0 is dropped from the available version
history. When version 12.0 is placed into the document library, version
2.0 is dropped. This pattern repeats to ensure that only ten major
versions are available at any given time.
Set the second check box and text box, as shown in Figure 7.
Specifying that three major versions’ worth of drafts are retained
results in all drafts other than those belonging to the current major
version and the two previous ones being discarded. If the most recent
major version is 8.0, for example, only the draft (point) versions for
versions 6.0, 7.0, and 8.0 are available. Any drafts that existed for
previous versions (such as 5.1 and 5.2) are discarded. When version 9.0
is made available, all existing drafts for version 6.0 are dropped with
these settings. When version 10.0 is made available, drafts for version
7.0 are dropped. You get the idea.
Scroll to the bottom of the Versioning Settings page and click the OK button to place your changes into effect.
As an administrator, you
should be happy to hear that Recycle Bins and versioning work together
and complement one another quite well. When a list item is deleted from a
document library or list, the version history for the item goes with it
to the Recycle Bin. By the same token, recovering an item from either
the first or second stage Recycle Bins also restores that list item’s
version history.