Re: [rt-users] What is $HideUnsetFieldsOnDisplay?

2016-10-03 Thread Kenneth Marshall
On Mon, Oct 03, 2016 at 02:11:32PM -0400, Alex Hall wrote:
> Hi all,
> The only note for the configuration variable in the docs says "hides unset
> fields on ticket display", which I knew from the variable name. But what is
> an unset field, and is this on ticket creation as well? How do I unset a
> field, or does it mean a field not filled in during ticket creation? I
> hoped I could unset a few fields my work will never need, to take away some
> clutter, such as 'time worked' or the article selection on a ticket reply.
> Thanks for any explanations.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

When you are looking at the ticket display, the custom fields and their values
are listed, even ones that do not currently have a value. Setting this config
option determines whether empty value fields will be displayed. In 4.4, this
is a per-user preference setting.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


[rt-users] What is $HideUnsetFieldsOnDisplay?

2016-10-03 Thread Alex Hall
Hi all,
The only note for the configuration variable in the docs says "hides unset
fields on ticket display", which I knew from the variable name. But what is
an unset field, and is this on ticket creation as well? How do I unset a
field, or does it mean a field not filled in during ticket creation? I
hoped I could unset a few fields my work will never need, to take away some
clutter, such as 'time worked' or the article selection on a ticket reply.
Thanks for any explanations.

-- 
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Excluding Commands from CommandbyMail parsing

2016-10-03 Thread Parish, Brent
Hi.

Dunno if it is the best way, but what I do it in RT 4.4.1 is edit the file:
   
/opt/rt4/local/plugins/RT-Extension-CommandByMail/lib/RT/Extension/CommandByMail.pm

Around line 349 look for this block of code, and add the line indicated with 
the plus (+) in front of it (without including the plus sign itself).

 my $found_pseudoheaders = 0;
 foreach my $line (@content) {
 next if $line =~ /^\s*$/ && ! $found_pseudoheaders;
+ last if $line =~ m/^(from:|cid:)/i;
 last if $line !~ /^(?:(\S+(?:{.*})?)\s*?:\s*?(.*)\s*?|)$/;
 last if not defined $1 and $found_pseudoheaders;
 next if not defined $1;

What this does is bail out of processing further lines as mail commands once it 
finds a line beginning with “From: “  (e.g. from a forwarded email).
It ALSO drops out if it finds “cid:”, which we sometimes saw with inline images 
being forwarded.

Please note that on older versions of RT, this block of code was found 
somewhere around line 228 in:

/opt/rt4/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm

Thanks,
Brent



From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Chris McClement
Sent: Sunday, October 02, 2016 7:56 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Excluding Commands from CommandbyMail parsing

I've implemented the CommandbyMail extension 
(http://search.cpan.org/dist/RT-Extension-CommandByMail/lib/RT/Extension/CommandByMail.pm)
 in my RT 4.4.4 installation. It works well - almost too well!  I am getting 
"Extended Mailgate Errors" returned because the plugin is parsing the message 
body for "Command: value" (which it is meant to do) and picking up, in emails 
forwarded to RT:

"To: x...@abc.com"
"From: x...@abc.com"
"sent: the_date_sent"

And trying to process them as commands.

In addition, forwarded emails have "Subject: [Support ID #12345] 
some_new_subject" and this is changing the subject of the RT job to the new 
subject, which is different from the subject used when the ticket was 
originally created.

Is there a way to stop CommandbyMail from parsing "to:" "from" and "sent:" as 
commands, or at least configuring it to not return errors when it fails to 
match it to a valid command? And is there a way to prevent parsing "Subject: 
" so that my subjects no longer change?


-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017