< Day Day Up > |
The edit action edits object metadata. When you invoke edit with an object specification, if no additional information is given on the command line, rt enters interactive mode in the editor specified by the $EDITOR environment variable. When you quit the editor, the ticket is updated. This is similar to the create action, except that the editor displays the current values of all the fields instead of an empty template. Only values that actually change are sent back to the server. $ rt edit ticket/47 id: ticket/47 Queue: General Owner: Nobody Creator: jdoe Subject: There is a light that never goes out Status: new Priority: 50 InitialPriority: 50 FinalPriority: 0 Requestors: Cc: AdminCc: Created: Mon Sep 20 21:07:39 2004 Starts: Mon Sep 20 21:05:11 2004 Started: Not set Due: Mon Sep 20 21:05:11 2004 Resolved: Not set Told: Not set TimeEstimated: 0 TimeWorked: 0 TimeLeft: 0 In addition, you can set many of the fields of an object using the set, add, or del subactions on the command line: $ rt edit ticket/42 > add cc=root@eruditorum.org \ > del cc=root@localhost \ > set priority=99 \ > set status=open \ The available fields that you can set, add, or del are the same as the fields presented when you edit an object in a text editor. Some of these attributes cannot be changed, like Created and id. Using the example of the user created above, modify the information by setting the emailaddress. The information in this case is sufficient to avoid entering interactive mode. $ rt edit user/bigboote set emailaddress=bigboote@example.com # User 66 updated. Now use show to display the modified information. $ rt show user/66 -f id,name,emailaddress id: user/66 Name: bigboote EmailAddress: bigboote@example.com You escalate a ticket by increasing its priority: $ rt edit ticket/42 set priority=80 To assign a ticket set the owner of the ticket. To take a ticket, set the owner to yourself. $ rt edit ticket/7 set owner=fayewong To resolve a ticket set the status to resolved: $ rt edit ticket/15 set status='resolved' |
< Day Day Up > |