< Day Day Up > |
The show action displays a ticket and its metadata, history, and attachments: $ rt show ticket/3 id: ticket/3 Queue: General Owner: darren Creator: root Subject: Bring more coffee rolls! Status: open Priority: 90 InitialPriority: 0 FinalPriority: 0 Requestors: Cc: AdminCc: Created: Mon May 03 21:18:30 2004 Starts: Mon May 03 21:17:43 2004 Started: Mon May 03 22:20:23 2004 Due: Mon May 03 21:17:43 2004 Resolved: Not set Told: Not set TimeEstimated: 0 TimeWorked: 0 TimeLeft: 0 As you can see, show displays a lot of information by default. To limit the amount of detail returned, pass the -f option to specify the fields you want to see. The field names correspond to what show displays, except they are not case-sensitive. The following example limits the display to ticket ID, queue name, subject, status, and priority: $ rt show ticket/3 -f id,queue,subject,status,priority id: ticket/3 Queue: General Subject: Bring more coffee rolls! Status: open Priority: 90 By default, show shows the object's metadata. However, there are other object attributes you might want to see, like a ticket's history or attachments. These attributes are addressed using the object specification syntax. To access the history attribute of ticket 9, use ticket/9/history. $ rt show ticket/9/history # 6/6 (/total) 63: Ticket created by jdoe 64: Cc root@localhost added by jdoe 72: Cc root@eruditorum.org added by jdoe 73: Cc root@localhost removed by root 74: Priority changed from 0 to 99 by jdoe 75: Status changed from new to open by jdoe You also can display all of the attachments for a ticket with the attachments attribute: $ rt show ticket/9/attachments Attachments: 7: (multipart/mixed / 0b), 8: (text/plain / 29b), 9: (multipart/mixed / 0b), 10: (text/plain / 0b), 11: output.txt (text/plain / 164b), 12: (text/plain / 622b) To view the plain-text content of one of the attachments, use the content attribute together with the attachments attribute: $ rt show ticket/9/attachments/11/content This is the output I get when I try the first solution: ... Here's a command to look at the information that makes up an RT user, reducing the output by specifying certain fields only: $ rt show -t user -f id,name,emailaddress,comments root
id: user/12 Name: root EmailAddress: root@localhost Comments: SuperUser When looking at several tickets at once, note that you can specify multiple IDs separated by commas, and a range of IDs defined with a dash between the minimum and maximum ID, as in the following example: $ rt show ticket/1,5-8,42 -f id,subject,status id: ticket/1 Subject: a new ticket Status: new -- id: ticket/5 Subject: a new ticket Status: new -- id: ticket/6 Subject: a new ticket Status: new ... In addition to the type/id form, you also can specify multiple object IDs at the end of the command, separated by either spaces or commas: $ rt show -t ticket -f id,subject,status 1 5-8 42 id: ticket/1 Subject: a new ticket Status: new -- id: ticket/5 Subject: a new ticket Status: new -- id: ticket/6 Subject: a new ticket Status: new -- id: ticket/7 Subject: a new ticket Status: new -- id: ticket/8 Subject: a new ticket Status: new -- id: ticket/42 Subject: a new ticket Status: new |
< Day Day Up > |