[rt-users] Autoreply with password

2016-01-19 Thread wajdi
When i configure my templaite to autoreply when create a ticket it's ok but
the autoreply comme in the subject of the email not in the body please what
can I do this (the text come in the body of the email).

Notice : here the code of auto reply

Subject: AutoReply: {$Ticket->Subject}

 

 

 Greetings,

 

 This message has been automatically generated in response to the

 creation of a helpdesk call:

 

 "{$Ticket->Subject()}",

 

 a summary of which appears below.

 

 There is no need to reply to this message right now. Your ticket has been

  assigned an ID of [{$rtname} #{$Ticket->id()}]. Please include this string

 in the subject line of all future correspondence about this issue.

 

 {

 *RT::User::GenerateRandomNextChar = \::User::_GenerateRandomNextChar;

 

 

 if (($Transaction->CreatorObj->id != $RT::Nobody->id) &&

 (!$Transaction->CreatorObj->Privileged) &&

 ($Transaction->CreatorObj->__Value('Password') eq '*NO-PASSWORD*')

 ) {

 

 

 

 my $user = RT::User->new($RT::SystemUser);

 $user->Load($Transaction->CreatorObj->Id);

 my ($stat, $pass) = $user->SetRandomPassword();

 

 

 

 if (!$stat) {

 $OUT .=

 

 "An internal error has occurred. RT was not able to set a password for you.

 Please contact your local RT administrator for assistance.";

 

 

 }

 

 

 $OUT .= "

 You can check the current status and history of your requests at:

 

 

 ".$RT::WebURL."

 

 

 When prompted, enter the following username and password:

 

 

 Username: ".$user->Name."

 Password: ".$pass."

 

 ";

 }

 }

 

 

 Thank you.

 {$Ticket->QueueObj->CorrespondAddress()}

 

 

 -

 {$Transaction->Content()}

 

 

 



[rt-users] Script to merge "recovered" or "clear" notifications from alert systems?

2016-01-19 Thread Dion Gullotta
There's a nice script for Nagios that will merge "Recovered" notifications into 
the existing ticket available here 
(https://metacpan.org/pod/RT::Extension::Nagios ) However we also use Zenoss in 
our environment which produces emails in a format this script won't recognize. 
Does anyone know of a generic script or way we could get the same functionality 
so it can be used with Zenoss?

Thanks,

Dion
Far Edge Technology





[rt-users] Set custom field on a transaction via REST?

2016-01-19 Thread Andrew Ruthven
Hey,

I've added a custom field for transactions to a queue. I can set the
custom field if I use the web UI to comment or reply. But, I can't seem
to set it when using the REST API, which is why I want to have the CF.

I've tried variations of CF.{Name} [0] and CF-Name [1] but none of
those work. Looking in:
 /usr/share/request-tracker4/html/REST/1.0/Forms/ticket/comment
I see nothing that mentions custom fields. I assume this is the correct
file as the "Got args" line is printed out when I submit my request.

Example log line:
Jan 20 15:50:46 prod-rt RT: [23112] Got args Text CF-Name Action.
(/usr/share/request-tracker4/html/REST/1.0/Forms/ticket/comment:59)

Any suggestions which by much appreciated.

This is RT 4.2.8 running on Debian Jessie.

[0] As mentioned on: https://github.com/z4r/python-rtkit#id17
[1] As used in the rt CLI for creating a ticket

-- 
Andrew Ruthven, Wellington, New Zealand
and...@etc.gen.nz | linux.conf.au 2016 
  New Zealand's only Cloud:   | LCA By the Bay, Geelong, AU
https://catalyst.net.nz/cloud | http://lca2016.linux.org.au