Click or drag to resize

Job Class

A Job in the Repository.
Inheritance Hierarchy
SystemObject
  System.Collections.GenericDictionaryString, Object
    Perforce.P4FormBase
      Perforce.P4Job

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public class Job : FormBase

The Job type exposes the following members.

Constructors
  NameDescription
Public methodJob
Initializes a new instance of the Job class
Top
Properties
  NameDescription
Public propertyComments (Inherited from FormBase.)
Public propertyComparer (Inherited from DictionaryString, Object.)
Public propertyCount (Inherited from DictionaryString, Object.)
Public propertyId
The job name
Public propertyIsFieldMultiLine (Inherited from FormBase.)
Public propertyItem (Inherited from DictionaryString, Object.)
Public propertyKeys (Inherited from DictionaryString, Object.)
Public propertyValues (Inherited from DictionaryString, Object.)
Top
Methods
  NameDescription
Public methodAdd (Inherited from DictionaryString, Object.)
Public methodClear (Inherited from DictionaryString, Object.)
Public methodContainsKey (Inherited from DictionaryString, Object.)
Public methodContainsValue (Inherited from DictionaryString, Object.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFromJobCmdTaggedOutput
Parse the tagged output of a 'job' command
Public methodGetEnumerator (Inherited from DictionaryString, Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetObjectData (Inherited from DictionaryString, Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodOnDeserialization (Inherited from DictionaryString, Object.)
Public methodParse
Parse a Job spec
(Overrides FormBaseParse(String).)
Public methodRemove (Inherited from DictionaryString, Object.)
Public methodToString
Convert to a Job specification
(Overrides FormBaseToString.)
Public methodStatic memberToStrings(IListJob)
Convert the Job to a Spec Def
Public methodStatic memberToStrings(Job)
Convert an array of Jobs to a list of JobIds to be passed as parameters to a command
Public methodTryGetValue (Inherited from DictionaryString, Object.)
Top
Remarks
A job specification has only one required field, "Job". If a Perforce installation uses a complex Job specification than the simple parsing and string formatting provided by the Form object cannot properly support the data, the Job object can subclassed to provide custom parsing and form generation
p4 help job

job -- Create or edit a job (defect) specification

p4 job [-f] [jobName]
p4 job -d jobName
p4 job -o [jobName]
p4 job -i [-f]

The 'p4 job' command creates and edits job specifications using an
ASCII form. A job is a defect, enhancement, or other unit of
intended work.The 'p4 fix' command associates changelists with jobs.

With no arguments, 'p4 job' creates an empty job specification
and invokes the user's editor. When the specification is saved,
a job name of the form jobNNNNNN is assigned. If the jobName
parameter is specified on the command line, the job is created or
opened for editing.

As jobs are entered or updated, all fields are indexed for searching
Text fields are broken into individual alphanumeric words (punctuation
and whitespace are ignored) and each word is case-folded and entered
into the word index. Date fields are converted to an internal
representation (seconds since 1970/01/01 00:00:00) and entered
into the date index.

The fields that compose a job are defined by the 'p4 jobspec' command.
Perforce provides a default job specification that you can edit.

The -d flag deletes the specified job. You cannot delete a job if
it has pending or submitted fixes associated with it.

The -o flag writes the job specification to the standard output.
The user's editor is not invoked.

The -i flag reads a job specification from the standard input. The
user's editor is not invoked.

The -f flag enables you set fields that are read-only by default.
The -f flag requires 'admin' access, which is granted using the
'p4 protect' command.

See Also