4.2. Creating a Ticket

 < Day Day Up > 

In order to create a ticket with rt, use the create action. This action creates users and queues in addition to new tickets, so create requires an object type:

     $ rt create -t ticket 

When this command is issued, your editor will open up with some basic data and fields for you to fill out:

     # Required: Queue, Requestor, Subject           id: ticket/new     Queue: General     Requestor: jdoe     Subject:     Cc:     AdminCc:     Owner:     Status: new     Priority: 50     InitialPriority: 50     FinalPriority: 0     TimeEstimated: 0     Starts: 2004-09-21 01:05:11     Due: 2004-09-21 01:05:11     Text: 

Once you fill in the required fields queue, requestor, and subject and write the file to submit the data to the server, you will get a message indicating success:

     # Ticket 23 created. 

If any of the required fields are not present, rt will reopen your editor with the data and a message indicating which fields were missing.

You also can create a ticket by passing values for the fields directly on the command line. At a minimum, you need a valid subject line and a queue:

     $ rt create -t ticket set subject="urgent contact request" set queue=general     # Ticket 45 created. 

Now use the show action to check that the ticket was correctly created.

     $ rt show ticket/45 -f id,subject,queue     id: ticket/45     Subject: urgent contact request     Queue: General 

You also can create users with the same create action, setting the minimal required name to avoid the interactive form.

     $ rt create -t user set name=bigboote     # User 66 created.           $ rt show user/66     id: user/66     Name: bigboote     Password: ********     EmailAddress: 

     < Day Day Up > 

    RT Essentials
    RT Essentials
    ISBN: 0596006683
    EAN: 2147483647
    Year: 2005
    Pages: 166

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net