Re: [rt-users] Search Query Builder Issues (Space Encoding?)

2015-03-19 Thread Landon Stewart
On Mar 19, 2015, at 8:20 AM, Richard Stevens  wrote:
> ...
> The end result is:
> 
> [25773] [Thu Mar 19 14:56:10 2015] [error]: Wrong query, expecting a OPERATOR 
> in 'Queue = 'Incident Reports' AND CF.{Affected >Users}<--here LIKE 'frog'' 
> at /opt/rt4/sbin/../lib/RT/SQL.pm line 130.
> 
> Has anyone observed this type of behaviour?

Hi Richard,

I had this problem just the other day actually.  You must enclose CF.{...} in 
single quotes when ... has a space in it.

Instead of:  CF.{Affected Users}
Do this: 'CF.{Affected Users}'

Also to see what you are looking at in plain text you can visit the full URL 
and then change RTIR/Search/Results.html to /Search/Build.html and then click 
"Advanced" on the top right.  The "Query" box will give you the plain text of 
the search you are performing for any given URL.

Landon Stewart : lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com : +1 (888) 909-4932


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [rt-users] Search Query Builder Issues (Space Encoding?)

2015-03-19 Thread Richard Stevens
Thanks Alex,

I had thought it was intermittent, but after some more troubleshooting it
appears that the "intermittent" is the switch in context between the RT
(works) and RTIR (does not) search pages (if searches are started from
Search-->Tickets-->New Search) when it identifies the search against an
RTIR queue.  The issue happens consistently if I use RTIR-->Search-->New
Search.

If I intercept the RTIR search request and append a
"&Queue=Incident+Reports" to the form submission it does change the
behaviour so after adding the entry you can search (with no results), and
"Edit Search" returns the original error:


[image: Inline image 2]

You were spot on on the encoding - same behaviour on the page regardless of
how the spaces are communicated (Confirmed it doesn't happen for custom
fields without spaces in the name).

Thanks,

Rich

On Thu, Mar 19, 2015 at 1:25 PM, Alex Vandiver 
wrote:

> On Thu, 19 Mar 2015 11:20:51 -0400 Richard Stevens
>  wrote:
> > Hello,
> >
> > We recently upgrades to RT 4.2.10 / RT-IR-3.2.0 and I'm seeing
> intermittent
> > issues on search commands involving custom fields with spaces:
> > [snip]
>
> The spaces are a red herring.  The actual difference is that the
> working one includes &Queue=Incident+Reports.  Where is the latter
> query being generated from?
>  - Alex
>


Re: [rt-users] Search Query Builder Issues (Space Encoding?)

2015-03-19 Thread Alex Vandiver
On Thu, 19 Mar 2015 11:20:51 -0400 Richard Stevens
 wrote:
> Hello,
> 
> We recently upgrades to RT 4.2.10 / RT-IR-3.2.0 and I'm seeing intermittent
> issues on search commands involving custom fields with spaces:
> [snip]

The spaces are a red herring.  The actual difference is that the
working one includes &Queue=Incident+Reports.  Where is the latter
query being generated from?
 - Alex 


Re: [rt-users] HTML emails from CLI

2015-03-19 Thread Alex Vandiver
On Wed, 18 Mar 2015 10:44:43 + "Eierschmalz, Bernhard"
 wrote:
> Is there any way to create Tickets with HTML email from CLI?

rt create -t ticket -ct text/html

 - Alex


[rt-users] How to get Assets working within in RTIR

2015-03-19 Thread Lisa Tawfall
Has anyone gotten the Assets extension to work within the RTIR interface?
i.e. I'm trying to get the 'Add Asset' widget to show up on the ticket
display under RTIR.

They work fine independently of each other, but I want to be able to do the
same sort of asset tagging within RTIR as regular RT.

Lisa


[rt-users] Search Query Builder Issues (Space Encoding?)

2015-03-19 Thread Richard Stevens
Hello,

We recently upgrades to RT 4.2.10 / RT-IR-3.2.0 and I'm seeing intermittent
issues on search commands involving custom fields with spaces:

RTIR/Search/Results.html?Format=%27%3Cb%3E%3Ca+href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%27%3Cb%3E%3Ca+href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%0AStatus%2C%0AQueueName%2C%0AOwner%2C%0APriority%2C%0A%27__NEWLINE__%27%2C%0A%27__NBSP__%27%2C%0A%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C%0A%27%3Csmall%3E__CreatedRelative__%3C%2Fsmall%3E%27%2C%0A%27%3Csmall%3E__ToldRelative__%3C%2Fsmall%3E%27%2C%0A%27%3Csmall%3E__LastUpdatedRelative__%3C%2Fsmall%3E%27%2C%0A%27%3Csmall%3E__TimeLeft__%3C%2Fsmall%3E%27&Order=ASC%7CASC%7CASC%7CASC&OrderBy=id%7C%7C%7C&Query=Queue+%3D+%27Incident+Reports%27+AND+%27CF.%7BAffected+Users%7D%27+LIKE+%27frog%27&Queue=Incident+Reports&RowsPerPage=50

Works,

/RTIR/Search/Results.html?Format=%27%3Cb%3E%3Ca%20href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%27%3Cb%3E%3Ca%20href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%0AStatus%2C%0AQueueName%2C%0AOwner%2C%0APriority%2C%0A%27__NEWLINE__%27%2C%0A%27__NBSP__%27%2C%0A%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C%0A%27%3Csmall%3E__CreatedRelative__%3C%2Fsmall%3E%27%2C%0A%27%3Csmall%3E__ToldRelative__%3C%2Fsmall%3E%27%2C%0A%27%3Csmall%3E__LastUpdatedRelative__%3C%2Fsmall%3E%27%2C%0A%27%3Csmall%3E__TimeLeft__%3C%2Fsmall%3E%27&Order=ASC%7CASC%7CASC%7CASC&OrderBy=id%7C%7C%7C&Query=Queue%20%3D%20%27Incident%20Reports%27%20AND%20CF.%7BAffected%20Users%7D%20LIKE%20%27frog%27&RowsPerPage=50

Does not (Both are generated by the search query builder at different times
- I'm unsure whats causing the different form encodings, same behaviour in
multiple browsers) - the only apparent distinction is the space URL
encoding of %20 (doesn't work) vs the HTTP "+" (works).

The end result is:

[25773] [Thu Mar 19 14:56:10 2015] [error]: Wrong query, expecting a
OPERATOR in 'Queue = 'Incident Reports' AND CF.{Affected >Users}<--here
LIKE 'frog'' at /opt/rt4/sbin/../lib/RT/SQL.pm line 130.

Has anyone observed this type of behaviour?

Rich


Re: [rt-users] Rt-crontool configure to set/move queue of ticket

2015-03-19 Thread a . smith

Ok, I've robbed the code:

my $argument = $self->Argument;
unless ( $argument ) {
$RT::Logger->error("Argument is mandatory for Test action");
return 0;
}


So now I can read in --action-arg.

For the email on queue change I tried creating a Scrip to do this via 
the GUI, this works fine if I change the queue via the GUI but when 
rt-crontool does it I don't get the notification :(. TBH I'd rather do 
this directly in my custom perl module so any help would be gratefully 
recieved on an easy way to achieve this, I want to notify AdminCCs,


thanks, Andy.


Re: [rt-users] Rt-crontool configure to set/move queue of ticket

2015-03-19 Thread a . smith

Ok, so I've cobbled together a custom actions module like this:

use strict;
use warnings;
use RT::Queue;
use base qw(RT::Action);

package RT::Action::Test;

my $self;

sub Prepare {
  my $self = shift;


  return 1;
}

sub Commit {
  my $self = shift;

  my ($status, $msg) = $self->TicketObj->SetQueue("Support2nd");
  if ( not $status ) {
RT::Logger->error("Could not reassign queue: $msg");
}

  return 1;
}

1;


To get to where I want it to be I now need to work out where the 
"--action-arg" is being passed or how to read that from within the 
module, is it the second arguement of $self?
Also what is the easiest way to notify all AdminCCs from within the 
module?


thanks! Andy.


Re: [rt-users] Improper display of ticket transaction's HTML

2015-03-19 Thread Jeff Blaine
On 3/11/2015 3:56 AM, Christian Loos wrote:
> Hi,
> 
> upgrading to a more recent version of RT and installing HTML::Gumbo
> gives you tables in transactions (RT supports this since 4.2.6) [1].
> 
> If you can't upgrade, you can use RT::Extension::PermissiveHTMLMail [2].
> 
> Chris
> 
> [1] https://www.bestpractical.com/docs/rt/4.2/RT_Config.html#PreferRichText
> [2] https://github.com/bestpractical/rt-extension-permissivehtmlmail

GOOD:

We've updated our test server to RT 4.2.10 and installed HTML::Gumbo per
the notes in the documentation for $PreferRichText. When
local/lib/RT/Interface/Web_Local.pm is configured to allow various table
attributes, including 'style', the transaction HTML now displays as a
table properly!

BAD:

But now there are various html, head, body tags on what seems to be only
search result blocks.

IIRC, image attachments are not allowed to the list. Here are 2
screenshots showing what I am talking about in case anyone wants to see:

https://www.dropbox.com/s/euca82h6qfagki1/rt-4210-broken.jpg?dl=0

https://www.dropbox.com/s/ym2ctowlo8qhmnf/rt-4210-broken2.jpg?dl=0

> Am 10.03.2015 um 20:35 schrieb Jeff Blaine:
>> Hi,
>>
>> We're using RT 4.2.5 (for now).
>>
>> $PreferRichText is turned on.
>>
>> We've put in place a Web_Local.pm that is allowing all tags via:
>>
>> push @SCRUBBER_ALLOWED_TAGS, qw('*');
>>
>> Something is still mucking with our HTML though, specifically (that
>> we've found so far) various table tags' attributes like borders and
>> padding seem to not be rendered properly. The table borders don't render
>> at all.
>>
>> Any ideas?
>>
>> It is a little unclear to me exactly how to use
>> %SCRUBBER_ALLOWED_ATTRIBS ... setting it to {'*', 1} caused various
>> links in the web UI to not work anymore.
>>
> 

-- 
Jeff Blaine
kickflop.net
PGP/GnuPG Key ID: 0x0C8EDD02


[rt-users] Rt-crontool configure to set/move queue of ticket

2015-03-19 Thread a . smith

Hi list,

  I'm interested in using rt-crontool to manage tickets, specifically 
I'd like to have unowned tickets automatically moved to another queue 
after X minutes. The issue I have is that there isn't a default perl 
module for this in "Actions", can anyone suggest how I can achieve this?
If there's some other way I can achieve my goal not using rt-crontool 
then I'd obviously be very happy for any other suggestions,


thanks in advance, Andy.