On Apr 30, 2007, at 10:23 AM, Konstantin Naryzhniy wrote:
Hello! RT 3.6.1Could anyone predict the results of setting ticket's owner manually throughsimple SQL query: update Tickets set Owner = 123456 where id = 654321; ?I know that there are several tables updated in SetOwner method and I aminterested what consequences such "brutal" workaround may cause.So far I've tested this query and it looks fine for ticket updating andresolving. If using this query multiple time eventually can trigger RT failure I wouldn't want to use it.
Using it even once will hurt you, alas.
Also, I would appreciate it very much if you could provide me with the listof tables updated during SetOwner.The reason I don't favor using SetOwner is that I do not know how to=) I'm trying to write a custom auto ticket assingment perl-module that should beput in crontab and I've just no idea how to utilize RT lib in there.
There should be some samples on the wiki to help you out, but this (untested) code may do what you mean:
#!/usr/bin/perl use warnings; use strict; use lib '/opt/rt3/lib'; use RT; RT::LoadConfig; RT::Init; use RT::Ticket; use RT::User; my $user = RT::User->new($RT::SystemUser); $user->LoadByCols(Name => 'root'); my $ticket = RT::Ticket->new($RT::SystemUser); $ticket->Load(1234); my ($val,$msg) = $ticket->SetOwner($user->id); print $msg;
Seriosly, I'm no programmer)) Any help and advice appreciated, Sincerely, Stan _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
