Forcibly incrementing ticket numbers once to start out

i know i’ve seen this, but i can’t find it anywhere…

i just want to increment my ticket numbers up to #1000 or something
to start off at a higher number (just to look more normal/professional
than giving out “your ticket is #3” or something)…

there must be an easy way to just up the number… i haven’t created ANY tickets
at all yet… so i guess i would want my first one to be #1000.

thanks all!

Gabriel Cadieux
Systems Engineer & IT Security Analyst
STI - Secure Technologies International, Inc.
Tel. (613) 830-3131 ext. 304
Cel. (613) 608-4635
Fax. (613) 830-5320
www.securetechnologies.ca

i just want to increment my ticket numbers up to #1000 or something
to start off at a higher number (just to look more normal/professional
than giving out “your ticket is #3” or something)…

ALTER TABLE Tickets AUTO_INCREMENT = 1000

hdp.

many thanks :slight_smile:

[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Hans
Dieter PearceySent: Wednesday, October 29, 2008 12:05 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] forcibly incrementing ticket numbers once
tostart out

hey all,

using RT 3.6.7…

i’m creating a shell script that will be called by an php page where an employee here can enter a service work order ticket number and then the script will use the RT shell to generate a nicer, customer-friendly version of the ticket, adding certain things (like a place for the custy to sign and date on reception), also ommiting certain unnecessary information, and formatting it to be printable, and more importantly, more presentable ro the customer than printing out an RT ticket straight from a browser.

now, i can manage to do a basic query on a ticket given the number…

‘show ticket/’ let’s say…

but that doesn’t show me the ticket history.

‘show ticket//history’ is great, but the CONTENT (or so-called ‘attachments’) isn’t displayed, and it also doesn’t TELL me if any of these items have attachments in them so that i can in turn query them using the ‘show ticket//attachments/<atch_number>/content’…

i’m very confused as to how useful this can possibly be to me at this point… i’m starting to wonder if it will even be possible to make what i’m trying to do…

now, my question is: is there an easy way to get the rt shell (or anything else) spit out a list of the entire ticket history, WITH attachment content (such as a ‘global summary of events’) for a specific ticket, so that i can just slap that info onto the footer of my page and not have to break my head open trying to parse and process all this stuff manually?

for example, i’d like to be able to issue a single command, and be given, just like in RT:

Wed Oct 29 12:32:40 2008 gabe - Ticket created

Customer wants an eval for a firewall.

Wed Oct 29 12:32:57 2008 gabe - Status changed from ‘new’ to ‘open’

Wed Oct 29 12:38:46 2008 gabe - Taken

or whatever the ticket history is, in FULL…

the problem is, i could technically do all of this with a shitload of partsing via awk and whatnot or maybe in perl with some string stuff, but then i still couldn’t associate ticket history entries with their appropriate ‘attachments’ (i.e. their content), which is what is most important when there are notes in the tickets…

please help, this is really important otherwise the whole point of using RT to create and manage our service work orders will go down the toilet… i need to be able to access the ticket info externally (preferably using the RT CLI shell since it already implements the ticketSQL stuff), and then make a nicey-looking printable HTML page out of it… i will do the formatting and selection of what fields i want manually for the header of it (all the custy address info, status of work order, etc…), but i need the history in whole, so ppl can see what was done with the ticket.

btw, we don’t use RT emailing at ALL. i have completely disabled emailing anything to anyone, we’re using this as a simple in-house ticket tracking solution.

thanks so much in advance.

-gabe

forgot to add, i also need the date and time associated with each history event and its subsequent attachments :frowning:

i also can’t find a way to correlate all this info into one big nice block of stuff i can include in my final output.

thx!-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Gabriel
Cadieux
Sent: Wednesday, October 29, 2008 12:58 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] easy way to display complete ticket history via RT
CLIshell

hey all,

using RT 3.6.7…

i’m creating a shell script that will be called by an php page where an employee here can enter a service work order ticket number and then the script will use the RT shell to generate a nicer, customer-friendly version of the ticket, adding certain things (like a place for the custy to sign and date on reception), also ommiting certain unnecessary information, and formatting it to be printable, and more importantly, more presentable ro the customer than printing out an RT ticket straight from a browser.

now, i can manage to do a basic query on a ticket given the number…

‘show ticket/’ let’s say…

but that doesn’t show me the ticket history.

‘show ticket//history’ is great, but the CONTENT (or so-called ‘attachments’) isn’t displayed, and it also doesn’t TELL me if any of these items have attachments in them so that i can in turn query them using the ‘show ticket//attachments/<atch_number>/content’…

i’m very confused as to how useful this can possibly be to me at this point… i’m starting to wonder if it will even be possible to make what i’m trying to do…

now, my question is: is there an easy way to get the rt shell (or anything else) spit out a list of the entire ticket history, WITH attachment content (such as a ‘global summary of events’) for a specific ticket, so that i can just slap that info onto the footer of my page and not have to break my head open trying to parse and process all this stuff manually?

for example, i’d like to be able to issue a single command, and be given, just like in RT:

Wed Oct 29 12:32:40 2008 gabe - Ticket created

Customer wants an eval for a firewall.

Wed Oct 29 12:32:57 2008 gabe - Status changed from ‘new’ to ‘open’

Wed Oct 29 12:38:46 2008 gabe - Taken

or whatever the ticket history is, in FULL…

the problem is, i could technically do all of this with a shitload of partsing via awk and whatnot or maybe in perl with some string stuff, but then i still couldn’t associate ticket history entries with their appropriate ‘attachments’ (i.e. their content), which is what is most important when there are notes in the tickets…

please help, this is really important otherwise the whole point of using RT to create and manage our service work orders will go down the toilet… i need to be able to access the ticket info externally (preferably using the RT CLI shell since it already implements the ticketSQL stuff), and then make a nicey-looking printable HTML page out of it… i will do the formatting and selection of what fields i want manually for the header of it (all the custy address info, status of work order, etc…), but i need the history in whole, so ppl can see what was done with the ticket.

btw, we don’t use RT emailing at ALL. i have completely disabled emailing anything to anyone, we’re using this as a simple in-house ticket tracking solution.

thanks so much in advance.

-gabe
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Have you tried reading the source?

share/html/Ticket/Elements/ShowHistory

seems like a good place to start inspecting how the WebUI does it.

Cambridge Energy Alliance: Save money & the planet

sadly i have, but i understand next to nothing at this advanced level of perl and the way RT uses it… it’s too much for my head, i just need a quick fix… otherwise we’re just going to end up manually going to the ticket history page, copy-pasting into a word doc, printing, and stapling the history the way it is in the webUI to the back of the beautified service work order HTML thing i’m making (which will include all the important info for the customer except the history).

-gabe-----Original Message-----
From: Jerrad Pierce [mailto:jpierce@cambridgeenergyalliance.org]
Sent: Wednesday, October 29, 2008 1:45 PM
To: Gabriel Cadieux
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] easy way to display complete ticket history via
RT CLIshell

Have you tried reading the source?

share/html/Ticket/Elements/ShowHistory

seems like a good place to start inspecting how the WebUI does it.

Cambridge Energy Alliance: Save money & the planet