A job is a written description of some modification to be made to a source code set. A job might be a bug description, like "the system crashes when I press
return
", or it might be a system improvement request, like "please make the program run faster." Creating and Editing Jobs
Jobs are created with the p4 job
command.
Job: job000125
User: edk
Status: open
Description:
Filters on the "Reply-To:" field
don't work.
p4 job
fields are:
If
p4 job
is called with no parameters, a new job is created. The name that appears on the form is new
, but this can be changed by the user to any desired string. If the Name
field is left as new
, or is blank, Perforce will assign the job the name job
N, where N
is a sequentially-assigned six-digit number.p4 job
jobname. The owner and description can be changed arbitrarily; the status can be changed to any of the three valid status values open
, closed
, or suspended
. If p4 job
jobname is called with a non-existing jobname, a new job is created. Linking Jobs to Changelists,
and Changing a Job's Status Automatically Performed Functions
All open jobs owned by a particular user will appear in all Perforce changelists subsequently created by that user. A job is automatically closed when one of its associated changelists is successfully submitted. Jobs can be disassociated from changelists by deleting the job from the changelist's change form.p4 submit
and sees the following:
p4 submit
, he sees
Manually Associating Jobs with Changelists
p4 fix -c
changenum jobname can be used to link any job, whether open, closed, or submitted, to any Perforce changelist, whether pending or submitted. If the job is open but the changelist has already been submitted, the job is closed. If the job has been closed but the changelist is pending, the job is reopened. Otherwise, the job keeps its current status.options-bug
to Ed. Unbeknownst to Sarah, the bug reported by the job was fixed in Ed's previously submitted changelist 18
. Ed links the job to the previously submitted changelist with p4 fix -c 18 options-bug
. Since the changelist has already been submitted, the job's status is changed to closed
.p4 fix
to link an open job to a changelist newly created by the owner of the job, since this is done automatically. However, p4 fix
can be used to link a changelist to a job owned by another user. Arbitrarily Changing a Job's Status
We've already seen two ways of changing a job's status:
p4 fix
will change the status of an open job to closed
if the associated changelist has already been submitted, and will change the status of a closed job to open
when the job is linked to a pending changelist.
p4 job
jobname, and then changing the status to one of the three allowed values. This is the only way of changing a job's status to suspended
.
A simple remedy is to change the status of any job to
suspended
. This can be done when the job is created, or after job creation with p4 job
jobname. A suspended job will not appear in any change form until the job is reopened, but it will still appear in the job reports generated by p4 jobs
.
p4 fix -d -c
changenum jobname. Jobs can be deleted entirely with p4 job -d
jobname.