A job is a numbered (or named) work request managed by the Perforce server. Perforce jobs enable you to track the status of bugs and enhancement requests and associate them with changelists that implement fixes and enhancements. You can search for jobs based on the contents of fields, the date the job was entered or last modified, and many other criteria.
Your Perforce administrator can customize the job specification for your site's requirements. For details on modifying the job specification, see the
Perforce System Administrator's Guide.
If you want to integrate Perforce with your in-house defect tracking system, or develop an integration with a third-party defect tracking system, see the P4DTI product information page on the Perforce web site.
To create a job using Perforce's default job-naming scheme, issue the p4 job command. To assign a name to a new job (or edit an existing job), issue the
p4 job jobname command.
Job: job000006 Status: open User: gale Date: 2005/11/14 17:12:21 Description: MAXLINE on NT can't account for NT 4.0 expanded cmd buffer size.
|
To edit existing jobs, specify the job name when you issue the p4 job command:
p4 job jobname. Enter your changes in the job form, save the form and exit.
To delete a job, issue the p4 job -d jobname command.
To search Perforce jobs, issue the p4 jobs -e jobview command, where
jobview specifies search expressions described in the following sections. For more details, issue the
p4 help jobview command.
You can use the expression 'word1 word2 ... wordN' to find jobs that contain all of
word1 through
wordN in any field (excluding date fields). Use single quotes on UNIX and double quotes on Windows.
You can use the * wildcard to match one or more characters. For example, the expression
fieldname=string* matches
string,
strings,
stringbuffer, and so on.
To search for words that contain wildcards, precede the wildcard with a backslash in the command. For instance, to search for
*string (perhaps in reference to
char *string), issue the following command:
To find fields that do not contain a specified expression, precede it with ^, which is the NOT operator. The NOT
operator
^ can be used only directly after an AND expression (space or
&). For example,
p4 jobs -e '^user=bruno' is not valid. To get around this restriction, use the
* wildcard to add a search term before the ^ term; for example:
p4 jobs -e 'job=* ^user=bruno' returns all jobs not owned by Bruno.
The behavior of these operators depends upon the type of the field in the expression. The following table describes the field types and how they can be searched.
|
|
|
|
|
The equality operator (=) matches the value in the word field exactly.
|
|
A block of text entered on the lines beneath the field name
|
The equality operator (=) matches the job if the value is found anywhere in the specified field.
The relational operators are of limited use here, because they'll match the job if any word in the specified field matches the provided value. For example, if a job has a text field ShortDescription: that contains only the phrase gui bug, and the expression is 'ShortDesc<filter', the job will match the expression, because bug<filter.
|
|
A single line of text entered on the same line as the field name
|
|
|
One of a set of values. For example, job status can be open/ suspended/ closed
|
The equality operator (=) matches a job if the value in the field is the specified word. Relational operators perform comparisons in ASCII order.
|
|
A date and optionally a time. For example, 2005/07/15:13:21:40
|
Dates are matched chronologically. If a time is not specified, the operators =, <=, and >= match the whole day.
|
|
Like text, but not indexed for searching.
|
|
If you're not sure of a field's type, issue the p4 jobspec -o command, which displays your job specification. The field called
Fields: lists the job fields' names and data types.
To search date fields, specify the date using the format yyyy/mm/dd or
yyyy/mm/dd:hh:mm:ss. If you omit time, the equality operator (
=) matches the entire day.
•
|
By setting the JobView: field in the p4 user form to an expression that matches the job.
|
You can modify job status directly by editing the job, but if you close a job manually, there's no association with the changelist that fixed the job. If you have altered your site's job specification by deleting the
Status: field, jobs can still be linked to changelists, but status cannot be changed when the changelist is submitted. (In most cases, this is not a desired form of operation.) See the chapter on editing job specifications in the
Perforce System Administrator's Guide for more details.
You can modify your Perforce user specification to automatically attach open jobs to any changelists you create. To set up automatic inclusion, issue the
p4 user command and set the
JobView: field value to a valid expression that locates the jobs you want attached.
User: bruno Update: 2005/06/02 13:11:57 Access: 2005/06/03 20:11:07 JobView: user=bruno&status=open
|
To link a job to a changelist manually, issue the p4 fix -c changenum jobname command. If the changelist has already been submitted, the value of the job's
Status: field is changed to
closed. Otherwise, the status is not changed.
You can use p4 fix to link a changelist to a job owned by another user.
Sarah has just submitted a job called options-bug to Bruno, but the bug has already been fixed in Bruno's previously submitted changelist 18. Bruno links the job to the changelist by typing:
To link jobs to changelists when submitting or editing the changelist, enter the job names in the
Jobs: field of the changelist specification. When you submit the changelist, the job is (by default) closed.
To unlink a job from a pending changelist, edit the changelist and delete its name from the Jobs: field. To unlink a job from a submitted changelist, issue the
p4 fix -d -c changenum jobname command.
Copyright 2005-2009 Perforce Software.