Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Document Properties Marker
doctypeapp-script
overridefalse
Short DescriptionEnforces comments in a specific format when documents are edited.
NameForce Commenthide
Short Name
Parent
Parent Property
property-nameName
hide
Audience
Name List
doctyperole
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
propertyAudience
empty-as-nonetrue

Subject
Name List
doctypesubject
propertySubject

Categories
Name List
doctypecategory
property-restrict-value-rangetrue
propertyCategories

Tags
Tag List
propertyTags

Flagshide
Iteration

Iteration
valueproduction

hide
Identifierde.smartics.userscripts.confluence.force-comment
Type

Name List
doctypeapp-script-type
render-no-hits-as-blanktrue
namesConfluence Userscript
property-restrict-value-rangetrue
propertyType


Suite
Name List
doctypeapp, app-extension, product-space
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
defaults-toancestor
propertySuite
hide
App Tool
Name List
doctypeapp-tool
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
defaults-toancestor
propertyApp Tool

Repository

System Link
file/projectdoc-bookmarklets-and-userscripts/raw/master/src/main/resources/de/smartics/projectdoc/confluence/force-comment.js
system-idbitbucket-smarticsurl-project-community-raw
labelforce-comment.js
titleThe source code of the script on Bitbucket.


Download
Attachment Link Macro
downloadCode
labelCode

Since1.0
Deprecated
Removed
Sort Keyhide

...

Section
titleDetails

Describing the use case for this script. First the use case for the 

Static Document Link
documentPDAC:Author
to-lower-casetrue
 then for the 
Static Document Link
documentuserscripts:Userscripts Administrator
to-lower-casetrue
.

Section
titleCommenting Changes

When opening a page where this script enforces the format of a comment, the Save button will be deactivated per default.

Screenshot showing the deactivated Save button.Image RemovedScreenshot showing the deactivated Save button.Image Added

Users who do not know how to work with comments, may click the Help button (Image RemovedImage Added).Screenshot showing the Help dialog for Commit Messages.Image Removed

Screenshot showing the Help dialog for Commit Messages.Image Added

Entering a valid comment will activate the Save button.

Screenshot showing a valid comment and the activated Save button.Image RemovedScreenshot showing a valid comment and the activated Save button.Image Added

If the comment does not meet the constraints, then the page cannot be saved.

Screenshot showing an invalid comment and therefore the inactive Save button.Image RemovedScreenshot showing an invalid comment and therefore the inactive Save button.Image Added

If the comment is indicating a new feature, then the checkbox for Notify watchers will be checked.

Screenshot showing the checked box for Notify watchers.Image RemovedScreenshot showing the checked box for Notify watchers.Image Added

Section
titleConfiguration of Userscript

Typically there is no need to enforce specific comments for each and every change for a page on a Confluence server. Typically versioned documents are located in a specific space. To activate the script for spaces with versioned documents, the 

Static Document Link
documentuserscripts:Userscripts Administrator
to-lower-casetrue
 may define a space category, like versioned, to be set.

Screenshot of the REST API Browser with the configuration for this userscript.Image RemovedScreenshot of the REST API Browser with the configuration for this userscript.Image Added

Configure the space category via the Space Tools.

Screenshot with Space Details on Space Tools.Image RemovedScreenshot with Space Details on Space Tools.Image Added

Once the categories contain a category 'versioned', as specified in the 

Static Document Link
documentuserscripts:Activation Record
to-lower-casetrue
 via activation-space-categories, the space will enforce the comment on every document.

...