[rt-users] Help With Script performance
Using the following script I will on occasion get "Deep recursion on anonymous subroutine". I am one not sure what this means and two I do not have any idea how to fix it. Looking for some ideas from the experts. Thanks. sub Commit { my $self = shift; my $ticket = $self->TicketObj; my $datecreated = $ticket->CreatedObj->Unix; my $datestarted = $ticket->Started; my ($st, $stmm, $stdd, $sthh, $stmn, $stss) = $datestarted =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/; my $dateresolved; my $timeworded; my $isodateresolved; my $transactions = $ticket->Transactions; $transactions->Limit( FIELD => 'Type', VALUE => 'Status', FIELD => 'NewValue', VALUE => 'closed'); # $transactions->Limit( FIELD => 'Type', VALUE => 'EmailRecord' ); while (my $transaction = $transactions->Next) { #print "Found Transaction\n"; if (defined $transaction->CreatedObj->Unix) { $isodateresolved = $transaction->CreatedObj->ISO; my ($, $mm, $dd, $hh, $mn, $ss) = $isodateresolved =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/; my ($defdays, $defhours, $defminutes, $defseconds) = Delta_DHMS($st, $stmm, $stdd, $sthh, $stmn, $stss, $, $mm, $dd, $hh, $mn, $ss); # later my $timeworded = ($defdays * 24 * 60) + ($defhours * 60) + $defminutes; if ($timeworded < 1) { $timeworded = 1; } $ticket->SetResolved($isodateresolved); $ticket->SetTimeWorked($timeworded); $RT::Logger->debug("Update Resolved on Closed Ticket script Complete for ticket " . $ticket->Id . "\n"); } } return 1; Bryon Baker Network Operations Manager Copesan - Specialists in Pest Solutions 800-267-3726 Ext. 2296 * 262-783-6261 Ext. 2296 bba...@copesan.com www.copesan.com "Servicing North America with Local Care" - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
[rt-users] Send email when a ticket is deleted?
Is there an easy way to have RT send an email when a ticket is deleted? We get some spam to our queues and it would be nice to know if someone already deleted it. Thanks, Omen -- Omen Wild Systems Administrator UC Davis - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
[rt-users] Expanding ticket numbers
Hi, Got a bit confused regarding expanding current ticket numbers, tried google this but didn't find anything clear. Ee are using #123456 hence #99 possible tickets? Problem is that due to spam and other unexpected high volume of tickets we are up to 13 already, this was much higher than anticipated after just a few months of use and soon this will increase even quicker. Running postgresql and doing below, will previous tickets be mismatched or what will happen in this case? Or is it even necessary will it just automatically expand beyond #99? select setval('tickets_id_seq', ); Regards, Joel - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] mail header use by RT
Hi, I've got an opposite problem: when I make a mail reply or forward, it doesn't matter whether I change the subject (remove RT ID from it) or not. And the mail is attached to the original ticked, although I wanted to create a new one. It appears to me that RT is using the "References" part in the header and the mail subject. Problem is that if you forward the mail outside RT and change subject, nobody then normally knows that it came from RT and therefore if you then send such a mail back to RT, it would be routed elsewhere, than you intended. I don't know whether it's the default behaviour or it's some hack from my predecessor administrators. So, could someone write here, what is the decision process in RT that takes place for a mail to create new ticket or attaching it to an existing one? Thank you, Petr On 2.5.2016 16:07, Albert Shih wrote: > Hi everyone. > > I got some issue about reply mail, some answer (to a mail come from RT) > create a new ticket instead > to be merge to the original ticket. > > I would like to known which header is use by RT to see it's a new mail or a > old ticket. > > I find in a mail header > > References: > Message-ID: > X-RT-Loop-Prevention: support.obspm.fr > X-RT-Ticket: support.obspm.fr #28939 > X-Managed-BY: RT 4.2.12 (http://www.bestpractical.com/rt/) > X-RT-Originator: some@obspm.fr > > Are they all be used or only X-RT-Ticket is used ? > > Regards. > > JAS > > > > > -- > Albert SHIH > DIO bâtiment 15 > Observatoire de Paris > 5 Place Jules Janssen > 92195 Meudon Cedex > France > Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71 > xmpp: j...@obspm.fr > Heure local/Local time: > lun 2 mai 2016 16:04:13 CEST > - > RT 4.4 and RTIR Training Sessions https://bestpractical.com/training > * Washington DC - May 23 & 24, 2016 > -- +---+ Petr Hanousek e-mail: petr.hanou...@cesnet.cz MetaCentrum User Supportphone: +420 950 072 112 CESNET z.s.p.o. mobile: +420 606 665 139 location: Zikova 13a, Praha room: 32b Czech Republic +---+ - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] remove large attachments and replace with download link
Am 07.06.2016 um 23:23 schrieb Hugo Escobar: > We need to give our users the possibility of receiving large files (say >> 10MB) > > Knowing the attachment size limit all email services impose, we thought > there should be a way to tell RT to replace large attachments with a > download > link when constructing the email message allowing the user to access those > files. > > I've been searching the internet to no avail. > > Any help will be appreciated This is possible in RT 4.4 if you use ExternalStorage Type "AmazonS3" [1] and activate the "Direct Linking" feature [2]. Chris [1] https://docs.bestpractical.com/rt/latest/RT_Config.html#External-storage [2] https://docs.bestpractical.com/rt/latest/RT/ExternalStorage/AmazonS3.html#Direct-Linking - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016