<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>JobIncrement.pl - Trigger to increment jobs with custom names.</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:brew@highsierra.nonet" /> </head> <body> <ul id="index"> <li><a href="#NAME">NAME</a></li> <li><a href="#VERSION">VERSION</a></li> <li><a href="#SYNOPSIS">SYNOPSIS</a></li> <li><a href="#DESCRIPTION">DESCRIPTION</a> <ul> <li><a href="#Overview">Overview</a></li> <li><a href="#Concepts">Concepts</a></li> </ul> </li> <li><a href="#ARGUMENTS">ARGUMENTS</a> <ul> <li><a href="#h--man">-h|-man</a></li> </ul> </li> <li><a href="#RETURN-STATUS">RETURN STATUS</a></li> </ul> <h1 id="NAME">NAME</h1> <p>JobIncrement.pl - Trigger to increment jobs with custom names.</p> <h1 id="VERSION">VERSION</h1> <p>1.0.3</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> <p>Enable this as a form-in trigger on the job form, for example:</p> <ul> <p>Triggers:</p> <ul> <p><code>JobIncrement form-in job "/p4/common/bin/triggers/JobIncrement.pl %formfile%"</code></p> </ul> </ul> <p>OR</p> <p><code>JobIncrement.pl {-h|-man}</code></p> <h1 id="DESCRIPTION">DESCRIPTION</h1> <h2 id="Overview">Overview</h2> <p>The default job naming convention with Perforce Jobs has an auto-increment feature, so that if you create a job with a 'Job:' field value of 'new', it will be changed to jobNNNNNN, with the six-digit value being automatically incremented.</p> <p>Perforce jobs also support custom job naming, e.g. to name jobs PROJX-123, where the name itself is more meaningful. But if you use custom job names, you forego the convenience of automatic generation of a new job number. Now typically, if the default job naming feature isn't used, it's because new issues originate in an external issue tracking. So there's no need for incrementing by Perforce; the custom job names just mirror the value in the external system (which handles the numbering of issues).</p> <p>This script aims to make it easier to use custom job names with Perforce even when there is no external issue tracker. This script provides the ability to generate new job names with automatically incremented numbers on a per-project basis.</p> <h2 id="Concepts">Concepts</h2> <ol> <li><p>Job Prefix</p> <p>The 'Project:' field in the Jobspec has a 'select' field with pre-defined values for project names. Projects desiring to use custom jobs names will define a counter named JobPrefix-<project_name>. The value will be a tag name, a short form of the project name, to be used as a prefix for job names. For example, a project named joe_schmoe-wicked-good-thing might have a prefix of WGT. Jobs will be named WGT-1, WGT-2, etc. By convention, job prefixes are comprised only of uppercase letters, matching the pattern ^[A-Z]$. No spaces, commas, dashes, underbars, etc. allowed. (There is no mechanism for mechanical enforcement of this convention, nor any needed, as tags are defined and created by Perforce Admins).</p> <p>To define a prefix for a project, an admin defines a value for the appropriate counter, e.g. by doing:</p> <p><code>p4 counter JobPrefix-joe_schmoe-wicked-good-thing WGT</code></p> <p>To see what job prefixes are currently defined, you can do:</p> <p><code>p4 counters -e JobPrefix-*</code></p> </li> <li><p>High Number Counter</p> <p>For projects with defined tags, there will also be a high number counter tracking the highest numbered job with a give prefix. This counter is created automatically and maintained by this script.</p> </li> <li><p>JobIncrement trigger (this script).</p> <p>This trigger script fires as a 'form-in' trigger on job forms, i.e. it fires on jobs that are on their way into the server. If 'Job:' field value is 'new' and the 'Project:' field value has an associated JobPrefix counter, then the name of the job is determined and set by incrementing the High Number counter, ultimately replacing the value 'new' with something like WGT-201 before it ever gets to the server. If no High Number counter exists for the project, it gets set to '1'.</p> </li> </ol> <h1 id="ARGUMENTS">ARGUMENTS</h1> <h2 id="h--man">-h|-man</h2> <p>Display a usage message. The -h display a short synopsis only, while -man displays this message.</p> <h1 id="RETURN-STATUS">RETURN STATUS</h1> <p>Zero indicates normal completion, Non-Zero indicates an error.</p> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 30913 | C. Thomas Tyler | Regnerated docs for release. | ||
#3 | 30385 | C. Thomas Tyler | Regnerated docs for release. | ||
#2 | 30041 | C. Thomas Tyler | Regenerated docs. | ||
#1 | 27727 | C. Thomas Tyler |
Refined docs for Unsupported scripts. Enhanced Unsupported doc Makefile to handle pod2html doc. Re-generated PDF and HTML docs. |