SharePoint remarks - Document Libraries

Previous Top Next


SharePoint remarks - Document Libraries configuration

Few comments related to:

1. All SharePoint Libraries

Processing of documents in non-Document Library locations is also possible, but it brings the risk that some of the core SharePoint documents might be changed, impacting the complete SharePoint platform. Due to this risk the "All SharePoint Libraries" option is only for experts.

2. Check-out / check-in, content approval, publishing and versioning

When ReplaceMagic checks documents out and in

In the following libraries ReplaceMagic always checks a document out before saving it and checks it in afterwards, regardless of the option "Should ReplaceMagic check-out/check-in documents":

  • libraries with major and minor (draft) versions,
  • libraries with content approval,
  • libraries with "Require documents to be checked out before they can be edited" (Require Check Out) - SharePoint does not allow saving a document there without a check-out.

In these libraries the approval status and the publishing status are always kept, and the selection under "Versioning settings" (Major Version, Minor Version or Keep Version Number) is used even if "Versioning settings" is not selected. If no selection was ever made, Keep Version Number is used.

In all other libraries (no versioning, or major versions only) the option "Should ReplaceMagic check-out/check-in documents" decides: with the option selected the document is checked out, saved and checked in, and "Versioning settings" are used; without it the document is saved directly and SharePoint creates a new version for every save.

Documents that are already checked out when processing starts

  • If "Try to change checked-out document(s)" is not selected, such documents are skipped and listed with the message "Document checked-out by XXXXX and cannot be changed!".
  • If the option is selected, ReplaceMagic releases the existing check-out (check-in), changes the document and checks it in again. After processing the document is no longer checked out. When SharePoint does not allow the check-out to be released as it is (typically when the document has a published or approved version), ReplaceMagic releases it with a major check-in (minor check-in in libraries with minor versions) - in libraries with versions this adds one version. Changes the check-out owner saved but did not check in may be overwritten.
  • In libraries with content approval, when a user checks out an approved document, SharePoint changes its status to Pending. ReplaceMagic keeps the status the document has when processing starts, so such a document stays Pending after processing - the changes of the check-out owner have not been approved yet. The previously approved version stays visible to other users until a new version is approved. (This applies only to documents checked out before processing. When ReplaceMagic itself checks out an approved document, it approves it again after the check-in and the document stays Approved.)

3. What will happen with different document library configurations

With "Versioning settings" = Keep Version Number and the option "Keep "Last modified date" and "Modified by" values" selected:

No versioning (with or without Require Check Out)

ReplaceMagic keeps the last modified date and the editor. There are no versions.

Major versions only

ReplaceMagic keeps the last modified date and the editor. Restoring them is a change of the document, so SharePoint creates one more version. Without check-out (option "Should ReplaceMagic check-out/check-in documents" not selected, library without Require Check Out) SharePoint creates one version for the save and one for restoring the date (1.0 → 3.0); with check-out only the version for restoring the date is added (1.0 → 2.0).

Major and minor versions (with or without Require Check Out)

Published documents stay published with the same version number (1.0 stays 1.0). Draft documents stay drafts; ReplaceMagic keeps their last modified date and editor, and restoring them adds one minor version (0.1 → 0.2).

For published documents the last modified date and the editor are set by SharePoint to the time and account of publishing. SharePoint does not allow a document to be published without recording who published it and when; restoring the original values afterwards would turn the published document into a draft. ReplaceMagic therefore keeps the document published and writes an "Info:" line about this into the log once per run.

Wiki and modern (Canvas) pages (Site Pages library): the content of a page is changed directly in the page, which creates a new draft of a published page. ReplaceMagic therefore publishes a page that was published before processing again (e.g. 22.0 → 23.0), so it does not stay in the state "Republish required". Pages that were drafts stay drafts. As for other published documents, SharePoint sets the last modified date and "Modified By" of the published page to the time and account of publishing.
In a Site Pages library with content approval ReplaceMagic keeps the approval status of the page as for other documents: an approved page is submitted and approved again (e.g. 2.0 → 3.0), a rejected page is submitted and rejected again, a pending page is submitted for approval again and a draft stays a draft. Approvals and rejections are recorded with the account used by ReplaceMagic; the last modified date and "Modified By" are set to the time and account of processing.

Content approval (with no versioning or with major versions; with or without Require Check Out)

ReplaceMagic keeps the approval status (approved, rejected or pending) and the version number. The last modified date and the editor are kept for pending documents. For approved and rejected documents ReplaceMagic records the approval or rejection again with its own account, and SharePoint sets the last modified date and the editor to the time and account of that approval - SharePoint requires that every approval and rejection is documented. The log contains an "Info:" line about this once per run.

Content approval + major and minor versions (with or without Require Check Out)

ReplaceMagic keeps the approval status (approved, rejected, pending or draft). Pending documents are submitted for approval again. Approved, rejected and pending documents keep their version number; their last modified date and editor are set by SharePoint to the time and account of processing (approval, rejection or submission for approval). Draft documents stay drafts; ReplaceMagic keeps their last modified date and editor, and restoring them adds one minor version (0.1 → 0.2). The log contains an "Info:" line about this once per run.

When a pending document is submitted for approval again, SharePoint clears its "Approver Comments". ReplaceMagic submits it with the approver comment, so the text is kept as the check-in comment of the submitted version (column "Check In Comment" and version history).

4. Overview

"Versioning settings" = Keep Version Number, "Keep "Last modified date" and "Modified by" values" selected:

Documents that were checked out before processing and are released by "Try to change checked-out document(s)" can get one more version (the release check-in).

Other "Versioning settings" in libraries with major and minor versions:

To keep published documents published and drafts as drafts, use Keep Version Number.

5. Remarks

  • The last modified date and the editor can be kept only if the account used by ReplaceMagic is a Site Collection Administrator.
  • Restoring the last modified date and the editor is a change of the document - in libraries with versions it adds one version (the version examples above). If additional versions are an issue, select "Save without extra version": the values are then restored without the additional version (major versions without check-out 1.0 → 2.0 instead of 3.0, drafts 0.1 → 0.1 instead of 0.2).
  • A pending document with an approver comment keeps both the comment and its last modified date and editor (libraries with content approval without minor versions).
  • The approval history shows the account used by ReplaceMagic for approvals and rejections it restores.