You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 6
Next »
Service to prefix the title with an automatically incremented identifier.
For some document types there is a natural tendency to provide a unique identifier. This include documents that specify requirements or issues on an issue tracker.
To administrate these values by hand is a bit cumbersome. Therefore the projectdoc Toolbox provides some support to manage identifiers and add them to the title of generated documents.
Use Cases in Action
The following screencasts show typical uses cases using the Auto-Increment Feature to place a unique ID in the title of a projectdoc document.
Customize the ID Prefix
Change the ID Prefix before creating your first Requirement to REQ-Component1 (instead of the default ID).
Change_ ID_ Prefix.mp4
Template Variable
The blueprint context is provided with the Auto Identifier (projectdoc.doctype.common.autoIdentifier
) variable that contains the generated identifier.
Sequences
The sequences are stored as content properties with the parent page. This makes the generation process quick, even if there are more than a few hundred siblings.
If you need to adjust the value, please use the REST API for content properties.
{
"value": "ID-10010-00010",
"version": {
"number": 2,
"minorEdit": false
}
}
A sequence id is compared by splitting it into its parts. Parts are delimited by the dash ('-
') character. Each part which represents an integer is compared as a number. Non-numbers are considered strings and are compared lexicographically. Shorter strings that are prefixes of other strings are considered smaller.
Please note that the natural sort order of titles in Confluence is not changed. So although the Auto Increment service understands that REQ-COMP1-123 is larger than REQ-COMP1-23, the natural sort order of documents being displayed in a list, sorted by the title will still be REQ-COMP1-23, REQ-COMP1-123. To compensate this, you could add leading zeros: REQ-COMP1-00123, REQ-COMP1-00023.