Re: [rt-users] about signatures

2015-07-17 Thread Roman Massey
Hi Bernhard,

From: http://requesttracker.wikia.com/wiki/SignatureToTheTop

working on rt 4.2.9

copy MessageBox to local/html/Elements. if rt is in /opt/rt4:

mkdir /opt/rt4/local/html/Elements  cp 
/opt/rt4/share/html/Elements/MessageBox $_

change

% $Default ||  %% $message %% $signature %/textarea

to:

% $Default ||  %% $signature %% $message %/textarea

clear your mason cache

rm -rf /opt/rt4/var/mason_data/obj

restart apache

-- 
Roman Massey

On June 1, 2015 at 2:46:45 AM, Eierschmalz, Bernhard 
(bernhard.eierschm...@scheppach.com) wrote:

Hello Alex,

 

thanks for your detailed mail. I have one idea to fix the position of 
signature, but for this I need to know one point of configuration.

 

You wrote:

I don't have an easy answer for moving the quoted text beneath the signature.  
As a desperate measure, your template could try to detect the beginning of 
quoted text and truncate all content after it.  There might be a big risk of 
truncating actual non-quoted content though.

 

This was the basic for my idea.

My idea is to split the {$Transaction-Content()} part into 2 pieces:

1.   Until “on date name wrote”

2.   After “on date name wrote”

 

With this splitting I will be able to place the signatures between the 2 parts.

 

But to provide a stable splitting, I would like to change the syntax of “on … … 
wrote” into some clearly syntax (e.g. with entering a new line with “_” before 
the “on date name wrote” line)

Can you tell me how to do this?

 

 

Best regards

Bernhard

 

Von: Alex Peters [mailto:a...@peters.net]
Gesendet: Montag, 26. Januar 2015 06:29
An: Eierschmalz, Bernhard
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] about signatures

 

You can use RT templates to add custom signatures to outgoing mail.  The 
template can read details for the user generating the mail, and output them in 
any manner that you wish.

 

First, you would need to ensure that the necessary information is entered into 
each user's account (Admin  Users  Select).

 

Second, you would need to create a template (or modify an existing one) to call 
on various elements like:

{ $Transaction-CreatorObj-Name }

{ $Transaction-CreatorObj-WorkPhone }

 

You might want to include logic to omit the fields (and possibly log an error 
to RT's log) if they are empty for a particular user.

 

Other methods on the CreatorObj are available here:

 

https://www.bestpractical.com/docs/rt/4.2/RT/User.html

 

I don't have an easy answer for moving the quoted text beneath the signature.  
As a desperate measure, your template could try to detect the beginning of 
quoted text and truncate all content after it.  There might be a big risk of 
truncating actual non-quoted content though.

 

 

On 21 January 2015 at 17:47, Eierschmalz, Bernhard 
bernhard.eierschm...@scheppach.com wrote:

Hello,

 

I have 2 questions about signatures.

 

1.   For our “non-request-tracker”-mails I have a HTML-Template, to 
standardize all our outgoing email signatures (on the email server runs a 
program that attaches the template with filled in parameters for name phone 
number etc. to every email)
is it possible to use a HTML-Template like this also for emails sent through 
request tracker? (the problem is, the software only sees one email address for 
each queue, so I need to generate the signature directly in RT.

 

2.   In the moment our signatures are attached under the quoted text; many 
customers complain about this. Is it possible to place the signature between 
message and quoted text?

 

 

By the way: we use RT 4.2.8

 

 

 

Best regards,

Bernhard

 

[rt-users] Edit fields on mobile

2015-07-17 Thread Roman Massey
Hi everyone,

is it possible to edit fields on mobile interface? and custom fields?

Thanks!

-- 
Roman Massey


[rt-users] Show all values of enter multiple values cf in template

2015-07-16 Thread Roman Massey
Hi Everyone,

I know about {$Ticket-FirstCustomFieldValue(‘cfname’)} But I have a custom 
field with “enter multiple values” and I need to display all the values in an 
email template. Is there an object for this?

Help will be greatly appreciated. Thanks!

-- 
Roman Massey


Re: [rt-users] checking/changing default queue for a user

2015-07-16 Thread Roman Massey
Here’s a scrip I use for assigning queue depending on requestor email address. 

I stripped it down for you so this code is not tested. It runs through a hash 
so you can put multiple addresses corresponding to multiple queues. If you only 
need to do it for one address then you can eliminate the hash and while loop. 
The regex checks if the requestor email address contains the hash key. So you 
can put a full email address instead of just the domain.


Create a new scrip (condition: On Create, Action: User defined, Template: 
blank) and I applied it to our “INCOMING” queue which all tickets created by 
email go into.

Custom action preparation code:

# initialize vars
my $DestinationQueue;
my $RequestorEmail = $self-TicketObj-RequestorAddresses;

# map domains to queue name
my %DomainToQueueName = (
'example.com'   = 'Example Queue',
'example2.com'  = 'Example Queue #2',
);

# iterate through dealership list and set the value to put in the CF
while ( my $Key = each %DomainToQueueName )
{
if( $RequestorEmail=~ /\Q$Key/ ) {
$DestinationQueue = $DomainToQueueName{$Key};
}   
}

#set the queue
if($DestinationQueue) {
my( $st, $msg ) = $self-TicketObj-SetQueue($DestinationQueue);
}

return 1;




-- 
Roman Massey

On July 15, 2015 at 5:50:27 PM, Aaron McCormack (aa...@backblaze.com) wrote:

Hi Boris,

Mixing bits of these two might get you on the right track with a scrip 
processing the ticket upon creation, I use something similar for regex matching 
patterns in subject lines and assigning to a specific queue.

http://requesttracker.wikia.com/wiki/SetOwnerAndQueueBySubject
http://requesttracker.wikia.com/wiki/AutomaticCustomFieldValue

Aaron


On Jul 14, 2015, at 2:18 PM, Boris Epstein borepst...@gmail.com wrote:

Hello listmates,

If I as an admin need to set a certain queue for requests originating from a 
user - how do I do that? Let us say I have a user John Smith, with an email of 
jsm...@abc.com. How do I make it so that every ticket by email coming from 
jsm...@abc.com goes into a certain queue.

Thanks.

Boris.



[rt-users] Customizing with overlays, question about file path

2015-07-16 Thread Roman Massey
Hi Everyone, 

I have an easy question. Where do I create the “local” dir to put overlays? 
Confused because there is the path /usr/src/rt-4.2.9/ but also /opt/rt4/. Do I 
make /usr/src/rt-4.2.9/local/? or /opt/rt4/local/? 

Running RT 4.2.9 on Ubuntu 14.04

Thanks!

-- 
Roman Massey


[rt-users] can't create ticket when On Create Autoreply To Requestors scrip is enabled

2015-07-15 Thread Roman Massey
Hi Everyone,

On a fairly fresh RT 4.2.9 install, having a weird problem. Unable to create 
tickets, when creating through web interface it sits for about a minute then 
gets an error. When creating through email, it gets same error and fires a 
confirmation email every fetch mail.

If I disable the scrip “On Create Autoreply to Requestors” then everything 
works fine (other than the requestors don’t get auto reply, which i require)

Here is the error from apache error log (removed domain name):

[2182] [Wed Jul 15 18:40:22 2015] [info]: 
rt-4.2.9-2182-1436985622-547.59-...@example.com #59/743 - Scrip 7 On Create 
Autoreply To Requestors (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:284)
[Wed Jul 15 14:41:02.817655 2015] [fcgid:warn] [pid 1821:tid 140203513018112] 
[client 174.1.203.63:2074] mod_fcgid: read data timeout in 40 seconds, referer: 
http://.../Ticket/Create.html?Queue=18
[Wed Jul 15 14:41:02.817752 2015] [core:error] [pid 1821:tid 140203513018112] 
[client 174.1.203.63:2074] End of script output before headers: rt-server.fcgi, 
referer: http://.../Ticket/Create.html?Queue=18

Help would be greatly appreciated!

-- 
Roman Massey


Re: [rt-users] Code to get list of a custom field's values (almost there)

2015-07-03 Thread Roman Massey
Thanks Barton!

That wasn’t exactly what I wanted but it helped me figure it out! btw I had to 
capitalize Dumper in “print Dumper $client;” for it to work. But seeing 
everything that came out of the “dumper” let me know the innards of the 
RT::CustomFieldValue.

The code I ended up using:

my $clientcustomfield = RT::CustomFieldValues-new($RT::SystemUser);
$clientcustomfield-LimitToCustomField(45);

my $clients = $clientcustomfield;

while (my $client = $clients-Next ) {
print $client-Name;
print \n;
}

—
Roman Massey

 On Jul 2, 2015, at 7:41 AM, Barton Chittenden bar...@bywatersolutions.com 
 wrote:
 
 In this case, $client is a reference to a hash. You can't print it directly, 
 but you can print the contents using Data::Dumper.
 
 I think this should work:
 
 use Data::Dumper;
 my $clientcustomfield = RT::CustomFieldValues-new($RT::SystemUser);
 $clientcustomfield-LimitToCustomField(45);
 
 my $clients = $clientcustomfield;
 
 while (my $client = $clients-Next ) {
 print dumper $client;
 print \n;
 }
 
 
 
 On Wed, Jul 1, 2015 at 10:23 PM, Roman Massey romanmas...@gmail.com 
 mailto:romanmas...@gmail.com wrote:
 Hi Guys, Looking for some advice on a script to fetch list of a custom 
 field’s values. At the moment it’s printing 
 RT::CustomFieldValue=HASH(0x91f22b0)”. I’m obviously missing something silly 
 and would really appreciate a guru’s touch!
 
 my $clientcustomfield = RT::CustomFieldValues-new($RT::SystemUser);
 $clientcustomfield-LimitToCustomField(45);
 
 my $clients = $clientcustomfield;
 
 while (my $client = $clients-Next ) {
 print $client;
 print \n;
 }
 
 
 —
 Roman Massey
 
 



[rt-users] Code to get list of a custom field's values (almost there)

2015-07-01 Thread Roman Massey
Hi Guys, Looking for some advice on a script to fetch list of a custom field’s 
values. At the moment it’s printing RT::CustomFieldValue=HASH(0x91f22b0)”. I’m 
obviously missing something silly and would really appreciate a guru’s touch!

my $clientcustomfield = RT::CustomFieldValues-new($RT::SystemUser);
$clientcustomfield-LimitToCustomField(45);

my $clients = $clientcustomfield;

while (my $client = $clients-Next ) {
print $client;
print \n;
}


—
Roman Massey



[rt-users] How to get latest transactions regardless of ticket?

2015-06-30 Thread Roman Massey
Hey does anyone have a script or any idea how to fetch latest transactions 
regardless of ticket? Can’t find any good docs on how to use the 
RT::Transactions method. Trying to do a “Facebook feed” of latest transactions 
for the dashboard.

P.S. This community is awesome and I have a lot of scripts and mods I want to 
share to give back for all the help I’ve received here. Where is the best place 
to share this?

Thanks!!

-- 
Roman Massey


[rt-users] How to edit transactions?

2015-05-24 Thread Roman Massey
Is there a way to edit transactions like comments? For example the content, 
time worked, etc. 

-- 
Roman Massey


[rt-users] Portlet list of tickets per custom field value (similar to quicksearch portlet)

2015-05-22 Thread Roman Massey
Hi, I am looking for a way to list amounts of tickets per a custom field value; 
similar to how the quicksearch portlet shows queues and how many tickets are in 
them. E.G. I have a custom field for tickets called “Client” so I can record 
which client the ticket is for. I need a list for the dashboard to show 
something like:

openstalled
Client 13   6
Client 21   0
Client 34   9

I have tried using a chart however a crucial feature I need is to be able to 
click on the client and be sent to a search page with all their tickets, and I 
don’t know if charts can be made with links like that.

I looked at the wiki page on writing portlets and also the mason template for 
the quicksearch portlet but it is over my head. I have a tiny bit of perl 
experience but I’m wondering if someone has written a similar script or could 
point me in the right direction.

Thanks!

-- 
Roman Massey


[rt-users] Mute notify requestor on resolve? (almost got it!)

2015-03-25 Thread Roman Massey
Hello,

I’m looking for help with “Mute notify requestor on resolve. I pieced 
something together from previous threads but I’m missing the last piece of the 
puzzle.

I have implemented this through a custom field and custom scrip and it is 
working. I’m also using the “edit custom field on reply/comment” extension. 
Works perfect if I change “Notify requestor on resolve?” to “No”, click update, 
then resolve; no email gets sent. HOWEVER I’d like to do this in one fell 
swoop, so..

Here is the issue: if I try to set the custom field “Notify requestor on 
resolve?” to “No” and change the status to “Resolved” at the same time, the 
resulting ticket history shows in this order: 

1. Ticket changed to resolved. 
2. Outgoing email recorded. 
3. Notify requestor on resolve? changed to “No”.

Custom condition for Notify requestor on resolve scrip:
my $txn = $self-TransactionObj;
my $type = $txn-Type;
return 0 unless $type eq Status
    || ( $type eq 'Set'  $txn-Field eq 'Status');
return 0 unless $txn-NewValue eq resolved;
return 0 if $self-TicketObj-FirstCustomFieldValue(Notify requestor on 
resolve?) eq No;
return 1;

Any tips will be greatly appreciated. Thanks!

-- 
Roman Massey