https://rt-wiki.bestpractical.com/index.php?title=Reporting&feed=atom&action=history
Reporting - Revision history
2024-03-28T10:19:37Z
Revision history for this page on the wiki
MediaWiki 1.37.2
https://rt-wiki.bestpractical.com/index.php?title=Reporting&diff=26533&oldid=prev
Phanousk at 14:22, 15 November 2017
2017-11-15T14:22:39Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:22, 15 November 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l13">Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del><<del style="font-weight: bold; text-decoration: none;">nowiki</del>>#!/bin/bash</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><<ins style="font-weight: bold; text-decoration: none;">source lang="bash"</ins>>#!/bin/bash</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ###########################</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ###########################</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l69">Line 69:</td>
<td colspan="2" class="diff-lineno">Line 69:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ## END ##</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ## END ##</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </<del style="font-weight: bold; text-decoration: none;">nowiki</del>></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </<ins style="font-weight: bold; text-decoration: none;">source</ins>></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l76">Line 76:</td>
<td colspan="2" class="diff-lineno">Line 76:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><source></ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ###############################################</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ###############################################</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ### RT3 Ticket Details for Ticket# 37 ###</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ### RT3 Ticket Details for Ticket# 37 ###</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l220">Line 220:</td>
<td colspan="2" class="diff-lineno">Line 220:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ======&gt; END Attachment# 37/254 &lt;======</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ======&gt; END Attachment# 37/254 &lt;======</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ### END TICKET 37 DETAIL ###</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ### END TICKET 37 DETAIL ###</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></source></ins></div></td></tr>
<!-- diff cache key bestpractical_mediawiki1459887241:diff::1.12:old-3143:rev-26533 -->
</table>
Phanousk
https://rt-wiki.bestpractical.com/index.php?title=Reporting&diff=3143&oldid=prev
Admin: 2 revisions imported
2016-04-06T20:36:16Z
<p>2 revisions imported</p>
<p><b>New page</b></p><div>==== 2009-01-22 by Patrick S. Kyne ====<br />
<br />
I have been using RT3 for a while now as my trouble-ticketing system. For most things, it just works and does so well.<br />
<br />
However, I must generate reports on those tickets and have not found an easy way to get the information I needed from RT3 quickly and neatly. (Printing of tickets from Firefox on Linux in my environment does not look very good.)<br />
<br />
At first, I was just viewing the ticket(s) in RT3 and then copying/pasting the information I wanted into my reports. This was rather awkward for me and very time consuming. I Googled, read the docs/[[FAQs]]/wiki, but didn't find anything that would readily do what I wanted/needed. I figured that I had one of four possibilities: Pulling the data directly from the database --[[MySQL]] here-- (I didn't know the database schema, but couldn't find all the information I wanted easily.); Possibly installing/configuring RTFM-the RT Faq Manager (after searching the docs/[[FAQs]]/wiki I wasn't confident I'd get what I wanted.); Write a perl application using the RT-api (I didn't find very much information about the RT-api on-line so I decided this would be my last choice.); or Use the RT-Tool mentioned in the [[FAQs]] to script my solution (I opted for this last route because it looked as if it would consume the least amount of time.)<br />
<br />
For my purposes, I need the following information from RT: Ticket#, Queue, Owner, Subject, Status, Created Date, Resolved Date, Time Worked, some custom fields, AND the dates &amp; content of the comments/replies fields. These last bits of data I found were considered attachments to the ticket by RT. Of course, I only wanted to get the attachments that were of type text.<br />
<br />
'''Below is my solution. It is not elegant, but rather a functional bash script. I hope it can be of use to others.'''<br />
<br />
----<br />
<br />
<nowiki>#!/bin/bash<br />
<br />
###########################<br />
### rt3ticket-report.sh ###<br />
###<br />
### by Patrick S. Kyne<br />
###<br />
### Quick? and dirty little script to print out RT3 ticket details<br />
### including ALL text/plain &amp; text/html attachments<br />
### for use outside of RT3.<br />
###<br />
### Requires: RT3, sed, &amp; grep.<br />
###<br />
### Created 2009-01-22 by Patrick S. Kyne<br />
###<br />
### Note: I often use this script to report on a group of tickets<br />
### by running from bash:<br />
### for TICKET in 37 45 46 47 48 51 52 53 55 56 57 ; do<br />
### ./rt3ticket-report.sh ${TICKET} ; done | tee tickets.txt<br />
###<br />
###########################<br />
<br />
RTPATH="/opt/rt3"<br />
<br />
if [[ $# -lt 1 ]]; then<br />
echo -e "\nERROR: Missing RT Ticket Number.\n"<br />
echo "Usage: $0 {ticket number} [ &gt; {filename} ]"<br />
echo -e "\tPrint RT Ticket details including comments &amp; replys."<br />
echo -e "\t(Attachments of type text/plain and text/html.)"<br />
exit<br />
fi<br />
<br />
# show ticket header<br />
echo "###############################################"<br />
echo "### RT3 Ticket Details for Ticket# ${1} ###"<br />
echo "###############################################"<br />
${RTPATH}/bin/rt show ticket/${1}<br />
<br />
# get ticket attachment number(s), if any<br />
ATTCH="`${RTPATH}/bin/rt show ticket/${1}/attachments | grep 'text/' | sed 's/(.*$//g;s/Attachments: //g;s/[ :]//g;s/$/,/g;/id.*/d;/^,/d;s/,$//g'`"<br />
<br />
# print attachement creation date &amp; contents, removing consecutive blank lines.<br />
for ATTMT in $ATTCH; do<br />
echo -e "\n======&gt; BEG Attachment# ${1}/${ATTMT} &lt;======"<br />
${RTPATH}/bin/rt show ticket/${1}/attachments/${ATTMT} | \<br />
sed '/^Transaction:/,/^Content:/{ /^Content:/,/^Transaction:/!d; };/^id:/,/^Creator:/d;/./,/^&amp;/!d'<br />
### Another method of retrieving Attachments (slower) ###<br />
## ${RTPATH}/bin/rt show ticket/${1}/attachments/${ATTMT}/content<br />
## ${RTPATH}/bin/rt show ticket/${1}/attachments/${ATTMT} | \<br />
## sed -n '/^Created:.*$/,$p' | \<br />
## sed '/^Transaction:/,/^Content:/{ /^Content:/,/^Transaction:/!d; }'<br />
echo -e "\n======&gt; END Attachment# ${1}/${ATTMT} &lt;======"<br />
done<br />
echo -e "### END TICKET ${1} DETAIL ###\n"<br />
<br />
## END ##<br />
</nowiki><br />
<br />
----<br />
<br />
'''Produces output like the following.''' '''Note: the redundancy at the bottom came as a result of my playing with this early ticket.'''<br />
<br />
----<br />
<br />
###############################################<br />
### RT3 Ticket Details for Ticket# 37 ###<br />
###############################################<br />
id: ticket/37<br />
Queue: MyQueue<br />
Owner: Patrick<br />
Creator: Patrick<br />
Subject: Beverly's msword not printing.<br />
Status: open<br />
Priority: 5<br />
InitialPriority: 5<br />
FinalPriority: 10<br />
Requestors: Patrick@myemail.address<br />
Cc:<br />
AdminCc:<br />
Created: Wed Oct 08 13:32:45 2008<br />
Starts: Wed Oct 08 00:00:00 2008<br />
Started: Thu Oct 09 01:05:28 2008<br />
Due: Wed Oct 08 00:00:00 2008<br />
Resolved: Not set<br />
Told: Not set<br />
LastUpdated: Thu Oct 09 01:05:28 2008<br />
TimeEstimated: 0<br />
TimeWorked: 90 minutes<br />
TimeLeft: 0<br />
CF.{Cost of Materials}: 0.00<br />
<br />
======&gt; BEG Attachment# 37/244 &lt;======<br />
Created: 2008-10-08 18:32:45<br />
Content: Beverly's msword will only quickprint. It crashes upon trying to print<br />
via any other method.<br />
-- Patrick<br />
<br />
======&gt; END Attachment# 37/244 &lt;======<br />
<br />
======&gt; BEG Attachment# 37/245 &lt;======<br />
Created: 2008-10-08 18:32:46<br />
Content:<br />
Greetings,<br />
<br />
This message has been automatically generated in response to the<br />
creation of a trouble ticket regarding:<br />
"Beverly's msword not printing.",<br />
a summary of which appears below.<br />
<br />
There is no need to reply to this message right now. Your ticket has been<br />
assigned an ID of [DTHH #37].<br />
<br />
Please include the string:<br />
<br />
[DTHH #37]<br />
<br />
in the subject line of all future correspondence about this issue. To do so,<br />
you may reply to this message.<br />
<br />
Thank you,<br />
THHSupport@myrtserver<br />
<br />
-------------------------------------------------------------------------<br />
Beverly's msword will only quickprint. It crashes upon trying to print<br />
via any other method.<br />
-- Patrick<br />
<br />
======&gt; END Attachment# 37/245 &lt;======<br />
<br />
======&gt; BEG Attachment# 37/246 &lt;======<br />
Created: 2008-10-08 18:32:46<br />
Content:<br />
Wed Oct 08 13:32:45 2008: Request 37 was acted upon.<br />
Transaction: Ticket created by Patrick<br />
Queue: MyQueue<br />
Subject: Beverly's msword not printing.<br />
Owner: Patrick<br />
Requestors: Patrick@myemail.address<br />
Status: new<br />
Ticket &lt;URL: https://myrtserver:8443/rt/Ticket/Display.html?id=37 &gt;<br />
<br />
<br />
Beverly's msword will only quickprint. It crashes upon trying to print<br />
via any other method.<br />
-- Patrick<br />
<br />
======&gt; END Attachment# 37/246 &lt;======<br />
<br />
======&gt; BEG Attachment# 37/251 &lt;======<br />
Created: 2008-10-09 06:05:24<br />
Content: &lt;p&gt;Followed recommendations of microsoft. Problem only appears on Beverly's user.&lt;/p&gt;<br />
&lt;p&gt;Re-installed msoffice. Applied mso97sp2b. Removed registry settings for user. Cleared temp directory.<br />
Problem still persists. Problem only appears in msword. msexcel and mspowerpoint both do not exhibit the problem.<br />
Will pursue with more research. Apparent option is to delete the user and create new user to resolve the problem.<br />
Will look for other options.&lt;br /&gt;<br />
-- Patrick&lt;/p&gt;<br />
<br />
======&gt; END Attachment# 37/251 &lt;======<br />
<br />
======&gt; BEG Attachment# 37/252 &lt;======<br />
Created: 2008-10-09 06:05:26<br />
Content:<br />
&lt;URL: https://myrtserver:8443/rt/Ticket/Display.html?id=37 &gt;<br />
<br />
Followed recommendations of microsoft. Problem only appears on Beverly's<br />
user.<br />
<br />
Re-installed msoffice. Applied mso97sp2b. Removed registry settings for user.<br />
Cleared temp directory. Problem still persists. Problem only appears in msword.<br />
msexcel and mspowerpoint both do not exhibit the problem. Will pursue with more<br />
research. Apparent option is to delete the user and create new user to<br />
resolve the problem. Will look for other options.<br />
-- Patrick<br />
<br />
<br />
======&gt; END Attachment# 37/252 &lt;======<br />
<br />
======&gt; BEG Attachment# 37/253 &lt;======<br />
Created: 2008-10-09 06:05:27<br />
Content: Followed recommendations of microsoft. Problem only appears on Beverly's<br />
user.<br />
<br />
Re-installed msoffice. Applied mso97sp2b. Removed registry settings for user.<br />
Cleared temp directory. Problem still persists. Problem only appears in msword.<br />
msexcel and mspowerpoint both do not exhibit the problem. Will pursue with more<br />
research. Apparent option is to delete the user and create new user to<br />
resolve the problem. Will look for other options.<br />
-- Patrick<br />
<br />
<br />
======&gt; END Attachment# 37/253 &lt;======<br />
<br />
======&gt; BEG Attachment# 37/254 &lt;======<br />
Created: 2008-10-09 06:05:27<br />
Content: Followed recommendations of microsoft. Problem only appears on Beverly's<br />
user.<br />
<br />
Re-installed msoffice. Applied mso97sp2b. Removed registry settings for user.<br />
Cleared temp directory. Problem still persists. Problem only appears in msword.<br />
msexcel and mspowerpoint both do not exhibit the problem. Will pursue with more<br />
research. Apparent option is to delete the user and create new user to<br />
resolve the problem. Will look for other options.<br />
-- Patrick<br />
<br />
<br />
======&gt; END Attachment# 37/254 &lt;======<br />
### END TICKET 37 DETAIL ###</div>
Admin