Creating a new project template

As a project designer, you can create a new template based on the CollabNet Baseline Project. The new template can contain customized subpages and pages. You can create a custom project template in the project-templates project using Subversion as your version control tool.

Alternately, you can create a project based on an existing template, customize the template, and then copy the template into the project-templates project. You must add a template.properties file when the template is copied to the project-templates project. You must use Subversion as the version control tool for the template.

Most of the files in the project template directories are HTML files. Knowledge of HTML is useful when customizing a project template.

To preview a custom template in the project-templates project, follow the steps in Previewing a project template.

Task overview: Creating a custom project template:

  1. Copy the CollabNet Baseline Project template directory into a new directory in the project-templates project.
  2. Edit the template.properties file and set the value of the Active option to True.
    Once you have created the template and edited an associated template.properties file, when a user creates a new project, he or she will have the option to select the custom template you have created, the CollabNet template, or another template if one has been created.
  3. Modify, add, or delete project subpages.
  4. Modify, add, or delete the Project Management page.
  5. Modify, add, or delete the Communications page.
  6. Modify, add, or delete the Metrics and Reporting page.
  7. Modify, add, or delete the Integrations page.
  8. Modify, add, or delete the project document templates.
  9. Modify, add, or delete the artifact types and queries used on the Stage subpages.

To create a directory for a custom project template in the project-templates project:

  1. Click the Projects tab, and click the link for the project templates project.
  2. To browse the contents of the CollabNet Baseline Project, click Subversion in the left navigation pane, and view the following directory:
    project-templates/trunk/www/templates/CollabNet-Baseline-Project Template-v1.1/
  3. Use Subversion to check out the CollabNet Baseline Project folder:
  4. Create a folder for a new project template in the project-templates project as follows:
    For example, you can create project-templates/trunk/www/templates/My-Process/
    Where My-Process is the name that you assign to the top-level directory for your custom project.
  5. Copy the contents of the CollabNet Baseline Project template directory into the new directory.
  6. Create a template.properties file at the same level of the hierarchy as the cn-project-pages folder.
    For example, you might create the following: project-templates/trunk/www/templates/My-Process/template.properties
    See "About the template.properties file" for details.
  7. Using your version control tool, add the folders and files to the Subversion repository.
  8. Using your version control tool, commit the folders and files to the Subversion repository.

About the template.properties file

Each project template in the project-templates project has a template.properties file. The template.properties file serves the following functions:

The template.properties file must reside in the top-level directory for the new template. You must create template folders in your version control repository under the project-templates/trunk/www/templates folder, for example:

project-templates/trunk/www/templates/MyNewProcessTemplate/template.properties

In general, you should use the properties set in the default template.properties file supplied with the CollabNet Baseline Project.

The following is a simple template.properties file:

title=A pretty good template
description=This template supports our organization's development process.
active=true
ignore=template.properties

The template.properties file contains the following items.

title - The name that is displayed on the project creation page. You can edit the name at any time and re-commit the file to the version control repository. If you do not supply a title, the folder name is displayed on the project creation page. For example:

title=empty

description - A short description of the template files. The description cannot contain line breaks. You can edit the name at any time and re-commit the file to the version control repository. This information is displayed on the project creation page. For example:

description=Default 'empty' project template

active - This can take a value of either true or false. This property must be set to true for the template to be available for selection during project creation. False is the default. For example:

active=true

ignore - You can exclude particular files and folders within the template folder from being published at the time of project creation. The property ignore: takes a set of file or folder names as a value. Separate names using a semicolon (;). The path should be relative to the template folder. For example:

ignore=template.properties; docs/changes.txt

versionControl - Specifies the version control tools that can be used with this project template. The allowed values are "svn" and "cvs." If you do not specify an option, any version control system is allowed. The CollabNet Baseline Project v1.1 uses "svn." Projects that use this template must be configured to use Subversion. Separate multiple values for this property with a comma. Note that there is a potential issue with allowing a user to select CVS as the version control repository for a project that uses the CollabNet Baseline Project. If CVS is used, project members may experience display problems if project data is displayed using a double-byte character set.

artifactTracking - Specifies what artifact tracking tool(s) can be used with this project template. The allowed values are "issueTracker" and "projectTracker." The CollabNet Baseline Project v1.1 uses "projectTracker." Projects that use this template must be configured to use Project Tracker. Separate multiple values for this property with a comma.

artifactTypes: - The (global) names of the Project Tracker artifact types to be associated with projects implementing the project template. These artifact types are associated automatically during project creation. The CollabNet Baseline Project v1.1 uses all artifact types that begin with the prefix "CNALM-v1.1:" Separate multiple values for this property with a comma.

optionalArtifactTypePrefixes - A prefix string that will be removed from the artifact types defined on the "artifactTypes" property (see above). The prefix is dropped from the artifact type display name, but the global artifact type definitions are not affected. The CollabNet Baseline Project v1.1 uses the prefixes CNALM-v1.1 and CNALM-TD-v1.1. For example, the artifact type CNALM-v1.1:Customer Case has a display name of "Customer Case." Separate multiple values for this property with a comma.

Previewing the custom template

At any time, you can preview a project template that resides in the project-templates project.

To preview a template:

  1. Click the Administration tab.
  2. Click the Project templates link.
  3. Click the link for the template that you want to preview.