Re: [rt-users] Custom fields validation on moving between two inactive states, after upgrade

2014-04-11 Thread Michele Bergonzoni

I recently upgraded from 4.0.9 to 4.2.3 and some users tell me that the
behaviour of mandatory custom field changed.


I recovered the old installation and DB from backups and the mistery is 
solved: from 4.0.9 to 4.2.3, the file share/html/Ticket/Modify.html 
changed in such a way that my Default callback was actually breaking 
custom field validation in 4.0.9, and is not any more breaking it in 4.2.3.


Best regards,
Bergonz

--
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] Custom fields validation on moving between two inactive states, after upgrade

2014-04-11 Thread Michele Bergonzoni

the file share/html/Ticket/Modify.html
changed in such a way that my Default callback was actually breaking
custom field validation


Not so simple: I removed all the local directory, including plugins, 
stopped apache, cleaned mason obj, and mandatory CF are still not 
validating. Maybe it's something in 4.0.9. Being an outdated version, I 
will not annoy you anymore about that.


Regards,
Bergonz

--
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] FullTextSearch the parts of word

2014-04-11 Thread Václav Ovsík
Hi Arkady,

On Thu, Apr 10, 2014 at 03:33:16PM +0400, Arkady Glazov wrote:
 Hi Václav,
 I will be in wait.
 
 I look databases. All content saved as 'quoted-printable'. I can send
 example If it help you.
...

On Fri, Apr 11, 2014 at 09:38:26AM +0400, Arkady Glazov wrote:
 Hi Václav,
 
 I send example of letter after this email.
 
 In my RT Database body of email show as:
...


I can confirm this. I try your message and my own message with latin2
chars and both are qp encoded :(.

  -[ RECORD 1 
]---+
  id  | 313295
  transactionid   | 411992
  parent  | 313294
  messageid   | e1wyuc2-0005yb...@skat-rt.seagroup.inc
  subject | Quoted-printable test for RT
  filename| 
  contenttype | text/plain
  contentencoding | quoted-printable
  content | =D0=9F=D1=80=D0=B8=D0=BC=D0=B5=D1=80 
=D1=82=D0=B5=D0=BA=D1=81=D1=82=D0=B0 =
  | 
=D1=81=D0=BE=D0=B4=D0=B5=D1=80=D0=B6=D0=B0=D1=89=D0=B5=D0=B3=D0=BE =D0=BA=
  | =D0=B8=D1=80=D0=B8=D0=BB=D0=B8=D1=86=D1=83 =D0=B8 
=D0=BB=D0=B0=D1=82=D0=B8=
  | =D0=BD=D0=B8=D1=86=D1=83.
  | This is example of cyrillic and latin text in th body.
  | Encode as quoted-printable.
  | 
  | --
  | Arkady Glazov
  | 
  ...

  nis=# \x
  Expanded display is on.
  nis=# select * from attachments where transactionid =411999;
  -[ RECORD 1 
]---+
  id  | 313298
  transactionid   | 411999
  parent  | 0
  messageid   | 20140411083151.GF8681@bobek.localdomain
  subject | test latin2
  filename| 
  contenttype | text/plain
  contentencoding | quoted-printable
  content | This is latin2 test:
  | Diakritika v =C4=8Desk=C3=BDch znac=C3=ADch...
  | =C5=BDlu=C5=A5ou=C4=8Dk=C3=BD k=C5=AF=C5=88 =C3=BAp=C4=9Bl 
=C4=8F=C3=A1bels=
  | k=C3=A9 =C3=B3dy.
  | --=20
  | V=C3=A1clav Ovs=C3=ADk
  | IIT-UNIX
  | ICZ a.s.
  | Pobo=C4=8Dka Plze=C5=88
  | N=C3=A1m=C4=9Bst=C3=AD M=C3=ADru 10, 301 00 Plze=C5=88, CZ
  | Tel. +420 222 275 511
  | vaclav.ov...@i.cz
  | http://www.i.cz
  | 
  | 
  ...

Than this is maybe ready for bugreport. I will try to debug this a little...
I think the previous versions of RT did decoding MIME encodings as possible
into UTF-8 raw shape, so fulltext can work.

My current RT 3.8.16 has distribution of encoding:

nis=# select distinct contentencoding, count(contentencoding) from attachments 
group by contentencoding;
 contentencoding  | count  
--+
 none | 283405
 quoted-printable |547
 base64   |   1711
  |  0
(4 rows)

Maybe this is a regression or some ugly feature of RT 4.2.x.

-- 
Zito
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] FullTextSearch the parts of word

2014-04-11 Thread Václav Ovsík
I have tried to feed test message into production RT instance 3.8.16
and it ends in the database:

  interni=# select contenttype, contentencoding, content, trigrams from 
attachments where transactionid =254774;
  -[ RECORD 1 
]---+--
  contenttype | text/plain
  contentencoding | none
  content | Пример текста содержащего кирилицу и латиницу.
  | This is example of cyrillic and latin text in th body.
  | Encode as quoted-printable.
  | 
  | --
  | Arkady Glazov
  | 
  trigrams| '-pr' 'abl' 'ady' 'amp' 'and' 'ark' 'ati' 'azo' 'ble' 'bod' 
'cod' 'cyr' 'd-p' 'dy.' 'ed-' 'enc' 'est' 'exa' 'ext' 'for' 'gla' 'his' 'ill' 
'int' 'kad' 'lat' 'laz' 'le.' 'lic' 'lli' 'mpl' 'nco' 'nta' 'ode' 'ody' 'ote' 
'ple' 'pri' 'quo' 'ril' 'rin' 'rka' 'tab' 'ted' 'tes' 'tex' 'thi' 'tin' 'uot' 
'xam' 'yri' 'zov' 'ати' 'аще' 'дер' 'его' 'екс' 'ерж' 'жащ' 'или' 'име' 'ини' 
'ири' 'ицу' 'кир' 'кст' 'лат' 'лиц' 'мер' 'ниц' 'оде' 'при' 'ржа' 'рил' 'рим' 
'сод' 'ста' 'тек' 'тин' 'цу.' 'щег'
  
So I think, this is really problem with RT 4.2.3 :(.
-- 
Zito
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training

Re: [rt-users] FullTextSearch the parts of word

2014-04-11 Thread Václav Ovsík
I think I found the critical point.
The problem is in the method RT::Record::_EncodeLOB().
I run a little script feeding message into the RT under debugger:
last actions was to setup breakpoint on b RT::Record::_EncodeLOB
and there is several steps:


  DB45 v
788:} elsif (!$RT::Handle-BinarySafeBLOBs
789$Body =~ /\P{ASCII}/
790!Encode::is_utf8( $Body, 1 ) ) {
791==$ContentEncoding = 'quoted-printable';
792 }
793 
794 #if the attachment is larger than the maximum size
795:if ( ($MaxSize) and ( $MaxSize  length($Body) ) ) {
796 
797 # if we're supposed to truncate large attachments
  DB45 x $Body
0  'Пример текста содержащего кирилицу и латиницу.
This is example of cyrillic and latin text in th body.
Encode as quoted-printable.

--
Arkady Glazov
'
  DB46 p Encode::is_utf8( $Body, 1 ) ? true : false
false


For some reason Encode::is_utf8(...) returns false :(.

Maybe the problem is with the libmime-tools-perl (I'm running on the Debian), I
have version 5.503-1.
-- 
Zito
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training

Re: [rt-users] FullTextSearch the parts of word

2014-04-11 Thread Václav Ovsík
On Fri, Apr 11, 2014 at 01:47:53PM +0200, Václav Ovsík wrote:
... 
 Maybe the problem is with the libmime-tools-perl (I'm running on the Debian), 
 I
 have version 5.503-1.
 ...

correction, I have localy installed version 5.505...

zito@rt2:~/migration/rt$ make testdeps |fgrep -i mime
MIME::Entity = 5.504 ...found
zito@rt2:~/migration/rt$ perl -MMIME::Entity -e ' print 
$MIME::Entity::VERSION\n;'
5.505

-- 
Zito
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] FullTextSearch the parts of word

2014-04-11 Thread Václav Ovsík
FYI: The problem has ticket
http://issues.bestpractical.com/Ticket/Display.html?id=29735
I found a temporary workaround - patch attached...
-- 
Zito
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 788aa42..304ac6a 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -787,7 +787,7 @@ sub _EncodeLOB {
 # Some databases (postgres) can't handle non-utf8 data
 } elsif (!$RT::Handle-BinarySafeBLOBs
$Body =~ /\P{ASCII}/
-   !Encode::is_utf8( $Body, 1 ) ) {
+   !utf8::valid($Body) ) {
   $ContentEncoding = 'quoted-printable';
 }
 
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training

[rt-users] Question on setting up self Service

2014-04-11 Thread john boris
Are there any How-To links to setup Self Service? I have been running an RT
Instance for many years and recently $WORK decided to change the email here
and I can no longer handle my internal Tech requests through my Drupal site
webforms and rt-mailgate.

So I would like to give my users a link to a form that would allow them to
add a ticket into RT.

If others do this I wold appreciate some pointers to  links or what I need
to add to rt.
I am running RT 4.2.2
-- 
John J. Boris, Sr.
Online Services
www.onlinesvc.com
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training