Re: [rt-users] rt-crontool changes ticket modification time

2008-10-15 Thread Bernd Kuhlen -WetterOnline-
i got it fixed to my needs. Here's what I changed in  
EscalatePriority.pm



sub Commit {
my $self = shift;
#   my ($val, $msg) = $self-TicketObj-SetPriority($self-{'prio'});
my ($val, $msg) = $self-TicketObj-__Set(Field = 'Priority',  
Value = $self-{'prio'}, RecordTransaction = 0);


   unless ($val) {
$RT::Logger-debug($self .  $msg);
   }
}

best regards,
Bernd___
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

[rt-users] rt-crontool changes ticket modification time

2008-10-14 Thread Bernd Kuhlen -WetterOnline-

Hi there,
I use rt-3.8.1 on a FreeBSD6.2 box.

Here's my cronjob:
0 * * * * /usr/local/bin/rt-crontool --search RT::Search::FromSQL -- 
search-arg (Status='new' OR Status='open' OR Status = 'stalled') -- 
action-arg RecordTransaction: 0 --action  
RT::Action::EscalatePriority /dev/null 2/dev/null


it's only there to escalate my ticket priorities.

My problem: the modification time (last access) of all my tickets is  
altered as well, so every ticket appears to have been worked upon  
within max 60 minutes (since my job runs every single hour). So I have  
no clue, which tickets are worked upon by my workmates. (apart from  
checking the history).


Is there any fix for that ?

best regards,
Bernd Kuhlen

___
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

[rt-users] deleting comments and replies from ticket

2008-10-10 Thread Bernd Kuhlen -WetterOnline-

Hi there,
in the searchable mailing list http://www.gossamer-threads.com/lists I  
could see, that deleting text from a ticket history has been an issue  
before. But maybe something changed within the past 2 years, so I'm  
going to ask here again. Is there a (handy) way do delete a single  
comment or reply from the ticket history? I know, it's not in the  
concept of tickets to delete anything. But if you have sensitive  
information or just a looong text that had been added by mistake it's  
really annoying to have it in the way for the whole ticket lifetime.


So apart from connecting to the database directly (which is dangerous  
anyway) does anybody know a suitable workaround?


best regards,
Bernd

___
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

Re: [rt-users] deleting comments and replies from ticket

2008-10-10 Thread Bernd Kuhlen -WetterOnline-

Hi,
I found it myself. It's in the book (RT Essentials) on page 71-72.
For those who don't have the book but have the same problem:

move you mousepointer in the ticket history on the hash-sign in the  
transaction you want to delete from the ticket. In the URL you'll find  
the transaction number (txn=.) Let's say, your number is 3577.

Then execute the following (as the user having access to your RT)

perl -I/usr/local/lib/rt3 -MRT -e 'RT::LoadConfig(); RT::Init(); my $t  
= RT::Transaction-new($RT::SystemUser); $t-Load(3577); print $t- 
Delete;'


The path /usr/local/lib/rt3 (on my FreeBSD box) might differ on your  
system (it WILL differ if you're using Linux, maybe /opt/rt3/lib).


On 10 Oct 2008, at 09:50, Bernd Kuhlen -WetterOnline- wrote:


Hi there,
in the searchable mailing list http://www.gossamer-threads.com/lists  
I could see, that deleting text from a ticket history has been an  
issue before. But maybe something changed within the past 2 years,  
so I'm going to ask here again. Is there a (handy) way do delete a  
single comment or reply from the ticket history? I know, it's not in  
the concept of tickets to delete anything. But if you have sensitive  
information or just a looong text that had been added by mistake  
it's really annoying to have it in the way for the whole ticket  
lifetime.


So apart from connecting to the database directly (which is  
dangerous anyway) does anybody know a suitable workaround?


best regards,
Bernd



___
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

Re: [rt-users] Action::EscalatePriority messing up my ticket history

2008-10-09 Thread Bernd Kuhlen -WetterOnline-

Hi,
that doesn't to the trick either I have to stick with EscalatePriority  
(for various reasons which are beyond the scope of this thread) an  
there these options are not available.
In fact I cannot find any Option there that gives me a hint it might  
help me out.


best regards,
Bernd

On 9 Oct 2008, at 12:38, Ham MI-ID, Torsten Brumm wrote:


Hi Bernd,
not sure for EscalatePriority Module, but for the  
RT::Action::LinearEscalate you can define to not mess um the history:


--from the modul:

  You should prefix options with LinearEscalate_ in the config:

  Set( $LinearEscalate_RecordTransaction, 1 );
  Set( $LinearEscalate_UpdateLastUpdated, 1 );

  From a shell you can use the following command:

  rt-crontool --search RT::Search::FromSQL --search-arg \
  (Status='new' OR Status='open' OR Status = 'stalled') \
  --action RT::Action::LinearEscalate \
  --action-arg RecordTransaction: 1

If i understand this correct, then set both to 0 will disable this.  
I think this module is doing more or less the same, but in a linear  
way.


Torsten


Kühne + Nagel (AG  Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann  
(Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.),  
Alfred Manke, Christian Marnetté (Stellv.),  Mark Reinhardt  
(Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen,  
Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878,  
Persönlich haftende Gesellschaft: Kühne  Nagel A.G., Sitz: Contern/ 
Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael Kühne



-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
] Im Auftrag von Bernd Kuhlen -WetterOnline-

Gesendet: Donnerstag, 9. Oktober 2008 11:21
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] Action::EscalatePriority messing up my ticket  
history


Hi everyone,

I've set up my rt-crontool like this:

0 1 * * * /usr/local/bin/rt-crontool --search RT::Search::FromSQL --  
search-arg (Status='new' OR Status='open' OR Status = 'stalled')  
-- action RT::Action::EscalatePriority /dev/null 2/dev/null


and it's working fine. But I don't want it to mess up my ticket  
history. I have tickets starting with a priority of 0 and ending  
with 100 in some weeks time and every night I get a new entry saying  
that the ticket priority has changed. These entry are informative if  
the priority has been manually changed but not if they just trace  
the linear priority escalation done by a cronjob. So after a couple  
of weeks I have numerous lines with a ticket-priority changed entry.

That's not nice.

I'm new to RT and couldn't find anything about this matter by google  
or in any wiki.


best regards,
Bernd

___
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




Mit freundlichen Grüßen
Best Regards

Bernd Kuhlen
Diplom-Meteorologe
Diplom-Informatiker (FH)
Leitung Systemadministration
___

WetterOnline
Meteorologische Dienstleistungen GmbH
Am Rheindorfer Ufer 2
D-53117 Bonn
Amtsgericht Bonn | HRB Nummer 008664
Geschäftsführer: Dr. Joachim Klaßen
Fon:   +49 (0) 228 55937-73
Fax:   +49 (0) 228 55937-80
Mobil: +49 (0) 177 8214319
E-Mail: [EMAIL PROTECTED]
Web: http://www.wetteronline-gmbh.de
___

___
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

Re: [rt-users] Action::EscalatePriority messing up my ticket history

2008-10-09 Thread Bernd Kuhlen -WetterOnline-

Dear Alex, Dear List,
thanks for your quick response. I should add that I'm using RT-3.8.1  
on FreeBSD6.3/amd64 (which I forgot in my first mail).


I did the following (which didn't quite help me):

mkdir -p Callbacks/MyCallbacks/Ticket/Elements/ShowHistory in my rt- 
root/local/html/Ticket directory. The whole directory Callbacks  
hadn't existed beforehand.

Into the file SkipTransaction I dumped the following:

%init
  $$skip = 1 if (($_SkipSystemMessages)  ($Transaction-Creator eq  
1));

/%init
%args
$Transaction = undef
$skip = undef
$_SkipSystemMessages = undef
/%args

Then in my Display.html I changed this block


 /Ticket/Elements/ShowHistory ,
 Ticket = $TicketObj,
 Tickets = $Tickets,
 Collapsed = $ARGS{'Collapsed'},
 ShowHeaders = $ARGS{'ShowHeaders'},
 Attachments = $attachments,
 AttachmentContent = $attachment_content,
 _SkipSystemMessages = !0- that's what I added
 

I must confess I don't have a clue what this code is doing I'm not a  
programmer. The only thing I know: my ticket history is still being  
messed up with priority-change entries.


I'm wondering if I could fix my problem by simply denying any existing  
rights for the user doing the cron job. Of course the Right  
ModifyTicket is needed but maybe there's some right for tracing  
changes in the history ?


best regards,
Bernd



On 9 Oct 2008, at 11:29, Alex Young wrote:


I set RT to hide some of the history using this:
http://wiki.bestpractical.com/view/HideTransactions

All I have done is set it to hide the history of the RT_System user  
and

the user I have setup to escalate the tickets. You can still see their
entries on the history page, just not in anoy of the other pages.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bernd
Kuhlen -WetterOnline-
Sent: 09 October 2008 10:21
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Action::EscalatePriority messing up my ticket
history

Hi everyone,

I've set up my rt-crontool like this:

0 1 * * * /usr/local/bin/rt-crontool --search RT::Search::FromSQL --
search-arg (Status='new' OR Status='open' OR Status = 'stalled') --
action RT::Action::EscalatePriority /dev/null 2/dev/null

and it's working fine. But I don't want it to mess up my ticket
history. I have tickets starting with a priority of 0 and ending with
100 in some weeks time and every night I get a new entry saying that
the ticket priority has changed. These entry are informative if the
priority has been manually changed but not if they just trace the
linear priority escalation done by a cronjob. So after a couple of
weeks I have numerous lines with a ticket-priority changed entry.
That's not nice.

I'm new to RT and couldn't find anything about this matter by google
or in any wiki.

best regards,
Bernd

___
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



Mit freundlichen Grüßen
Best Regards

Bernd Kuhlen
Diplom-Meteorologe
Diplom-Informatiker (FH)
Leitung Systemadministration
___

WetterOnline
Meteorologische Dienstleistungen GmbH
Am Rheindorfer Ufer 2
D-53117 Bonn
Amtsgericht Bonn | HRB Nummer 008664
Geschäftsführer: Dr. Joachim Klaßen
Fon:   +49 (0) 228 55937-73
Fax:   +49 (0) 228 55937-80
Mobil: +49 (0) 177 8214319
E-Mail: [EMAIL PROTECTED]
Web: http://www.wetteronline-gmbh.de
___

___
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

Re: [rt-users] Action::EscalatePriority messing up my ticket history

2008-10-09 Thread Bernd Kuhlen -WetterOnline-

Hi Alex,
I think I know the core of my problem. The whole directory ./Callbacks/ 
MyCallbacks hasn't existed before so I just made a mkdir to have  
it in my directory-tree.
But the RT doesn't know about the existence of this directory (it's  
not configured anywhere). That's why it's not working out, I guess.


I have a file called ShowHistory in my rt-root/html/Ticket/ 
Elements/ShowHistory. I'm pretty sure somewhere within this file I  
have to do the changes
I dump it for you (in case you have the time, please feel free just to  
skip this mail if you're busy ..)


%perl
if ($ShowDisplayModes or $ShowTitle) {
my $title = $ShowTitle
? loc('History')
: 'nbsp;';

my $titleright;

if ($ShowDisplayModes) {
$titleright = '';

if ($ShowHeaders) {
$titleright .= qq{a href=$URIFile?id=} .
   $Ticket-id.qq{} .
   loc(Brief headers) .
   qq{/a mdash; };
$titleright .= q[span class=selected] . loc(Full  
headers) . /span;

}
else {
$titleright .= q[span class=selected] . loc(Brief  
headers) . /span mdash; ;

$titleright .= qq{a href=$URIFile?ShowHeaders=1;id=} .
   $Ticket-id.qq{} .
   loc(Full headers) .
   qq{/a};
}
}
/%perl
div class=history
 /Widgets/TitleBoxStart, title = $title, titleright_raw =  
$titleright 

% }

div id=ticket-history
%perl
my @attachments = @{$Attachments-ItemsArrayRef()};
my @attachment_content = @{$AttachmentContent-ItemsArrayRef()};

while ( my $Transaction = $Transactions-Next ) {
my $skip = 0;
$m-callback(
%ARGS,
Transaction   = $Transaction,
skip  = \$skip,
CallbackName  = 'SkipTransaction',
);
next if $skip;

$i++;

my @trans_attachments = grep { $_-TransactionId == $Transaction- 
Id } @attachments;


my $trans_content = {};
grep { ($_-TransactionId == $Transaction-Id )   
($trans_content-{$_-Id} = $_)  } @attachment_content;



my $IsLastTransaction = 0;
if ( $OldestFirst ) {
$IsLastTransaction = $Transactions-IsLast;
} else {
$IsLastTransaction = 1 if ( $i == 1 );
}
#Args is first because we're clobbering the Attachments parameter
$m-comp( 'ShowTransaction',
%ARGS,

  Ticket   = $Ticket,
  Transaction  = $Transaction,
  ShowHeaders  = $ShowHeaders,
  RowNum   = $i,
  Attachments  = [EMAIL PROTECTED],
  AttachmentContent= $trans_content,
  LastTransaction  = $IsLastTransaction
 );

# manually flush the content buffer after each txn, so the user sees
# some update
$m-flush_buffer();
}

/%perl
/div
% if ($ShowDisplayModes or $ShowTitle) {
 /Widgets/TitleBoxEnd 
% }
/div
%INIT
my $Transactions = new RT::Transactions($session{'CurrentUser'});
if ($Tickets) {
while (my $t = $Tickets-Next) {
$Transactions-LimitToTicket($t-id);
}
} else {
$Transactions = $Ticket-Transactions;
}

my $OldestFirst = RT-Config-Get( 'OldestTransactionsFirst',  
$session{'CurrentUser'} );

my $SortOrder = $OldestFirst? 'ASC': 'DESC';
$Transactions-OrderByCols( { FIELD = 'Created',
  ORDER = $SortOrder },
{ FIELD = 'id',
  ORDER = $SortOrder },
  );

my $i;
$Attachments ||=  $m-comp('/Ticket/Elements/FindAttachments', Ticket  
= $Ticket, Tickets = $Tickets || undef);
$AttachmentContent ||= $m-comp('/Ticket/Elements/ 
LoadTextAttachments', Ticket = $Ticket);


/%INIT
%ARGS
$URIFile = RT-Config-Get('WebPath')./Ticket/Display.html
$Ticket = undef
$Tickets = undef
$Attachments = undef
$AttachmentContent = undef
$ShowHeaders = undef
$ShowTitle = 1
$ShowDisplayModes = 1
$WarnUnsigned = undef
/%ARGS



On 9 Oct 2008, at 14:43, Bernd Kuhlen -WetterOnline- wrote:


thanks a lot.
I'll check this out.

On 9 Oct 2008, at 14:39, Alex Young wrote:


Here is a copy of my file
/opt/rt3/local/html/Callbacks/MyCallbacks/Ticket/Elements/ 
ShowHistory/SkipTransaction


%init
  $$skip = 1 if (($_SkipSystemMessages)  ($Transaction-Creator  
eq 1 | $Transaction-Creator eq 12));

/%init
%args
$Transaction = undef
$skip = undef
$_SkipSystemMessages = undef
/%args

Creator ID 1 is RT_System, which pops up when you send emails out  
and other systems.

Creator ID 12 is the linux/RT user which runs the escelate job.

All it is doing is seeing who created the transaction, and if its  
user number 1 or 12, it skips it.


You will need ot find out the user ID number for the user running  
the escelate job. You can od this by looking in the user list. The  
nuber to the left is the number you would want to put into the  
“Creator eq XX” bit of the code.


From: Bernd

[rt-users] Action::EscalatePriority messing up my ticket history

2008-10-09 Thread Bernd Kuhlen -WetterOnline-
Hi everyone,

I've set up my rt-crontool like this:

0 1 * * * /usr/local/bin/rt-crontool --search RT::Search::FromSQL -- 
search-arg (Status='new' OR Status='open' OR Status = 'stalled') -- 
action RT::Action::EscalatePriority /dev/null 2/dev/null

and it's working fine. But I don't want it to mess up my ticket  
history. I have tickets starting with a priority of 0 and ending with  
100 in some weeks time and every night I get a new entry saying that  
the ticket priority has changed. These entry are informative if the  
priority has been manually changed but not if they just trace the  
linear priority escalation done by a cronjob. So after a couple of  
weeks I have numerous lines with a ticket-priority changed entry.  
That's not nice.

I'm new to RT and couldn't find anything about this matter by google  
or in any wiki.

best regards,
Bernd

___
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