Re: [rt-users] Rt search does not work with sphinx main+delta index

2013-09-11 Thread Guadagnino Cristiano
Well, it turned out that the problem with 4.0.17 not returning any result was 
due to a stale searchd process.
Restarting the daemon reverted behavior to that of RT 4.0.10, which was anyway 
wrong.

So, to restate it clearly: RT is only returning results from the main index, 
completely ignoring the delta index.

Please help.

Bye
Cris


Guadagnino Cristiano wrote:
I am having trouble with RT fulltext searches. I am using RT 4.0.17 with Mysql 
and Sphinx 4.0.8.
Sphinx is configured to use a main+delta index (configuration attached). Main 
index is created once every morning, while the delta index is created every 5 
minutes.
If I search using the search command line tool from Sphinx everything is 
correct.

Fulltext search with RT 4.0.10 instead seemed to return only the results from 
the main index, disregarding anything from the delta index.
So I updated to the latest RT release (4.0.17) just to be sure. Now fulltext 
search with RT does not return anything at all!!

Example from the CLI:

search CrevalPublic --rsort=date -q -l 500

This returns 73 hits on the main index and 39 ihits on the delta index.

Simple search with RT:

fulltext:CrevalPublic any

This returns 0 results.

Any suggestions?

T.I.A.
Bye
Cris
--
Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese


--
Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese




[rt-users] MergeUsers patch

2013-09-11 Thread Nathan Cutler
Hi Ruslan:

Thanks for the MergeUsers patch you provided awhile back. Do I need to
do anything special (pull request, etc.) to get this accepted
upstream, or will you take care of it?

Thanks,
Nathan


Re: [rt-users] MergeUsers patch

2013-09-11 Thread Thomas Bätzler
Nathan Cutler asked:

 Hi Ruslan:
 
 Thanks for the MergeUsers patch you provided awhile back. Do I need to
 do anything special (pull request, etc.) to get this accepted
 upstream, or will you take care of it?

He has already uploaded it to CPAN:

rt:~/.cpan/build/RT-Extension-MergeUsers-0.11-MGX37G# head -5 Changes 
0.11 Tue Sep 10 14:42:46 MSK 2013

* For every merged user in a collection one user at the end of
  the collection was skipped, for example in owners drop down,
  admin interface or in autocompletion lists.

Cheers,
Thomas


Re: [rt-users] MergeUsers patch

2013-09-11 Thread Ruslan Zakirov
What Thomas said.


On Wed, Sep 11, 2013 at 1:24 PM, Thomas Bätzler t.baetz...@bringe.comwrote:

 Nathan Cutler asked:

  Hi Ruslan:
 
  Thanks for the MergeUsers patch you provided awhile back. Do I need to
  do anything special (pull request, etc.) to get this accepted
  upstream, or will you take care of it?

 He has already uploaded it to CPAN:

 rt:~/.cpan/build/RT-Extension-MergeUsers-0.11-MGX37G# head -5 Changes
 0.11 Tue Sep 10 14:42:46 MSK 2013

 * For every merged user in a collection one user at the end of
   the collection was skipped, for example in owners drop down,
   admin interface or in autocompletion lists.

 Cheers,
 Thomas




-- 
Best regards, Ruslan.


Re: [rt-users] Fwd: How to list all enabled users in Perl script?

2013-09-11 Thread Ruslan Zakirov
Hi RT users,

A new version of MergeUsers extension has been released to the CPAN.


On Thu, Sep 5, 2013 at 6:54 PM, Nathan Cutler presnyprek...@gmail.comwrote:

  Can you test the following patch?

 I've applied the patch on both our testing and production instances.
 It seems to work! Will keep an eye on it to see if there are any
 undesired consequences.

 Thanks alot!





-- 
Best regards, Ruslan.


Re: [rt-users] MergeUsers patch

2013-09-11 Thread Nathan Cutler
Thanks, guys.

On Wed, Sep 11, 2013 at 1:54 PM, Ruslan Zakirov r...@bestpractical.com wrote:
 What Thomas said.


 On Wed, Sep 11, 2013 at 1:24 PM, Thomas Bätzler t.baetz...@bringe.com
 wrote:

 Nathan Cutler asked:

  Hi Ruslan:
 
  Thanks for the MergeUsers patch you provided awhile back. Do I need to
  do anything special (pull request, etc.) to get this accepted
  upstream, or will you take care of it?

 He has already uploaded it to CPAN:

 rt:~/.cpan/build/RT-Extension-MergeUsers-0.11-MGX37G# head -5 Changes
 0.11 Tue Sep 10 14:42:46 MSK 2013

 * For every merged user in a collection one user at the end of
   the collection was skipped, for example in owners drop down,
   admin interface or in autocompletion lists.

 Cheers,
 Thomas




 --
 Best regards, Ruslan.


Re: [rt-users] Rt search does not work with sphinx main+delta index

2013-09-11 Thread Ruslan Zakirov
Hi,

RT defines index in the CONNECTION attribute of the table, so you have to
adjust it to use several indexes, see the following doc:

http://sphinxsearch.com/docs/2.0.9/sphinxse-using.html

It's not clear how, but it implies that you can do the following:

ALTER TABLE t1 CONNECTION=sphinx://NEWHOST:NEWPORT/index1,index2,index3;



On Wed, Sep 11, 2013 at 11:07 AM, Guadagnino Cristiano 
guadagnino.cristi...@creval.it wrote:

  Well, it turned out that the problem with 4.0.17 not returning any result
 was due to a stale searchd process.
 Restarting the daemon reverted behavior to that of RT 4.0.10, which was
 anyway wrong.

 So, to restate it clearly: *RT is only returning results from the main
 index, completely ignoring the delta index*.

 Please help.

 Bye
 Cris



 Guadagnino Cristiano wrote:

 I am having trouble with RT fulltext searches. I am using RT 4.0.17 with
 Mysql and Sphinx 4.0.8.
 Sphinx is configured to use a main+delta index (configuration attached).
 Main index is created once every morning, while the delta index is created
 every 5 minutes.
 If I search using the search command line tool from Sphinx everything is
 correct.

 Fulltext search with RT *4.0.10* instead seemed to return only the
 results from the main index, disregarding anything from the delta index.
 So I updated to the latest RT release (*4.0.17*) just to be sure. Now
 fulltext search with RT does not return anything at all!!

 *Example from the CLI: *

 search CrevalPublic --rsort=date -q -l 500

  This returns 73 hits on the main index and 39 ihits on the delta index.

 *Simple search with RT:*

 fulltext:CrevalPublic any

  This returns 0 results.

 Any suggestions?

 T.I.A.
 Bye
 Cris
 --
 *Cristiano Guadagnino*
 Servizio Data Administration
 Bankadati S.I.
 Gruppo Credito Valtellinese

 **


 --
 *Cristiano Guadagnino*
 Servizio Data Administration
 Bankadati S.I.
 Gruppo Credito Valtellinese


 **




-- 
Best regards, Ruslan.


Re: [rt-users] REST API - User Create Example

2013-09-11 Thread Ruslan Zakirov
Hi,

The easiest way is to use bin/rt tool and enable debug output in it, it can
print all requests and responses.


On Wed, Sep 11, 2013 at 12:43 AM, Triplett, Jeff tripl...@miamioh.eduwrote:

 We are attempting to add RT into our Account Management System.  We would
 like to use the REST API to add new and update user information.  I have
 looked on http://requesttracker.wikia.com/wiki/REST but the documentation
 for User Create is a little sparse.

 What is the format that the REST API is expecting the User Create POST
 information in?

 I know that the REST documentation states  variable named content,
 containing key: value line by line, like the response to
 /user/user-id

 If I could get an example that would be very helpful.

 I am using CURL to test.  We are running RT 4.0.17 with ExternalAuth
 Plugin.

 --
 Thanks,
 Jeff Triplett
 Systems Administrator
 Miami University, Oxford, Ohio
 College of Engineering  Computing
 109B Benton Hall
 513-529-0791




-- 
Best regards, Ruslan.


Re: [rt-users] Allow or block login based on remote IP address

2013-09-11 Thread Ruslan Zakirov
On Wed, Sep 11, 2013 at 12:33 AM, Thiago Cristino dos Santos 
thiago.crist...@gmail.com wrote:

 Hi List,


 There is some way to allow or block user login based on specific remote IP
 address/range?

 E.g:
 Members of group 'Internal Users' can login only from 192.168.0.0/24
 Members of group 'Field Staff' can login from any IP/mask
 User john can login only from IP 192.168.0.12


Yes, but only with hacking RT.



 Thanks!







-- 
Best regards, Ruslan.


Re: [rt-users] Send creation email only, all other email suppressed

2013-09-11 Thread Ruslan Zakirov
The following may help:

http://requesttracker.wikia.com/wiki/Template#What_if_I_want_to_override_a_global_template_for_one_of_my_queues.3F

Also, empty template disables notification scrip.


On Tue, Sep 10, 2013 at 1:09 PM, Tony Atkinson 
tony.atkin...@dataproservices.co.uk wrote:

 Hello,

 Looking for the best way to modify a queue so that it only sends out the
 ticket creation emails.
 Email out to an address on ticket creation only, but all other actions /
 replies do not generate any email.

 Poked around with custom queue scrips, but there doesn't seem to be an
 easy way to generate a custom email

 Does anyone have any pointers on how to go about this?
 (Using RT 4)

 Many thanks




-- 
Best regards, Ruslan.


Re: [rt-users] Allow or block login based on remote IP address

2013-09-11 Thread Asif Iqbal
On Tue, Sep 10, 2013 at 4:33 PM, Thiago Cristino dos Santos 
thiago.crist...@gmail.com wrote:

 Hi List,


 There is some way to allow or block user login based on specific remote IP
 address/range?

 E.g:
 Members of group 'Internal Users' can login only from 192.168.0.0/24
 Members of group 'Field Staff' can login from any IP/mask
 User john can login only from IP 192.168.0.12

 Thanks!



How about blocking it at apache or nginx or whichever you are using to
access RT?




-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


Re: [rt-users] Rt search does not work with sphinx main+delta index

2013-09-11 Thread Guadagnino Cristiano
Ruslan,
first of all thank you very much for your help.
Your solution worked like a charm!

Now, reading the document you sent me I see that Sphinx allows to override the 
index (or indexes) name on the query text.
I tried it and it is actually working very well: it's sufficient to append 
;index=indexname1,indexname2 to the query text.

Don't you think it would be nice (and better from a usability point of view) to 
add a new configuration option to RT_Config.pm so that RT administrators that 
want to fine-tune their Sphinx configuration don't have to ALTER the 
AttachmentsIndex table? You should only change RT code so that every query sent 
to Sphinx gets the new token appended.
Well, just my 2 cents :-).

Thank you
Bye
Cris


Da: Ruslan Zakirov r...@bestpractical.commailto:r...@bestpractical.com
Inviato: Wed Sep 11 2013 14:25:56 GMT+0200 (CEST)
A: Guadagnino Cristiano 
guadagnino.cristi...@creval.itmailto:guadagnino.cristi...@creval.it
Cc: rt-users@lists.bestpractical.commailto:rt-users@lists.bestpractical.com 
rt-users@lists.bestpractical.commailto:rt-users@lists.bestpractical.com
Oggetto: Re: [rt-users] Rt search does not work with sphinx main+delta index
Hi,

RT defines index in the CONNECTION attribute of the table, so you have to 
adjust it to use several indexes, see the following doc:

http://sphinxsearch.com/docs/2.0.9/sphinxse-using.html

It's not clear how, but it implies that you can do the following:


ALTER TABLE t1 CONNECTION=sphinx://NEWHOST:NEWPORT/index1,index2,index3;


On Wed, Sep 11, 2013 at 11:07 AM, Guadagnino Cristiano 
guadagnino.cristi...@creval.itmailto:guadagnino.cristi...@creval.it wrote:
Well, it turned out that the problem with 4.0.17 not returning any result was 
due to a stale searchd process.
Restarting the daemon reverted behavior to that of RT 4.0.10, which was anyway 
wrong.

So, to restate it clearly: RT is only returning results from the main index, 
completely ignoring the delta index.

Please help.

Bye
Cris



Guadagnino Cristiano wrote:
I am having trouble with RT fulltext searches. I am using RT 4.0.17 with Mysql 
and Sphinx 4.0.8.
Sphinx is configured to use a main+delta index (configuration attached). Main 
index is created once every morning, while the delta index is created every 5 
minutes.
If I search using the search command line tool from Sphinx everything is 
correct.

Fulltext search with RT 4.0.10 instead seemed to return only the results from 
the main index, disregarding anything from the delta index.
So I updated to the latest RT release (4.0.17) just to be sure. Now fulltext 
search with RT does not return anything at all!!

Example from the CLI:

search CrevalPublic --rsort=date -q -l 500

This returns 73 hits on the main index and 39 ihits on the delta index.

Simple search with RT:

fulltext:CrevalPublic any

This returns 0 results.

Any suggestions?

T.I.A.
Bye
Cris
--
Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese


--
Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese





--
Best regards, Ruslan.

--
Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese
Tel. +39-0342-522172



[rt-users] rights for articles

2013-09-11 Thread Christian Loos
Hi,

I'm currently a little bit lost within the article rights.

Problem:
a user can see on the ticket update page the dropdown list with the
articles, but if he select an article the page reloads but the article
content isn't included in the message box.
If I (with SuperUser power) select an article the content is included in
the message box so i think this is an rights problem.

I created an Class and give the user the ShowArticle right and applied
the Class to the queue. On the custom field that holds the article
content the user have the SeeCustomField right via system group everyone.

Maybe someone have an idea what right am I missing.

RT version 4.0.17

Chris


Re: [rt-users] CLI question

2013-09-11 Thread Ruslan Zakirov
Hi,

It's very much expected for seconds to be there if the data is from DB. Can
you describe situation in more details?


On Mon, Sep 9, 2013 at 6:16 PM, Nathan Cutler presnyprek...@gmail.comwrote:

 In case anyone is interested, I patched the 'rt' script to fix the problem:

 # diff -u rt.old rt
 --- rt.old  2013-08-14 20:46:23.0 +0200
 +++ rt  2013-09-09 16:06:20.0 +0200
 @@ -1698,6 +1698,8 @@
  $mon = $month{$monstr} if exists $month{$monstr};
  } elsif ( /(\d{4})-(\d\d)-(\d\d)\s+(\d\d):(\d\d):(\d\d)/ ) {
  ($yr, $mon, $day, $hr, $min, $sec) = ($1, $2-1, $3, $4, $5, $6);
 +} elsif ( /(\d{4})-(\d\d)-(\d\d)\s+(\d\d):(\d\d)/ ) {
 +($yr, $mon, $day, $hr, $min, $sec) = ($1, $2-1, $3, $4, $5, 0);
  }
  if ( $yr and defined $mon and $day and defined $hr and defined $sec )
 {
  return timelocal($sec,$min,$hr,$day,$mon,$yr);

 Now the 'rt list' command works as expected.

 Nathan


 On Thu, Sep 5, 2013 at 4:40 PM, Nathan Cutler presnyprek...@gmail.com
 wrote:
  I'm trying to use the 'rt' command line script. It's working, except
  for an annoying error message:
 
  $ rt list status='new'
  Query:status='new'
  Ticket Owner QueueAge   Told Status Requestor Subject
 
 
  Unknown date format in parsedate: '2011-09-30 13:44'
 
  This Unknown date format error is written once for each line of output.
 
  Reading the code, I can see that RT is expecting the date format to
  include the seconds, yet in my case the seconds are missing.
 
  I can patch the code to add :00 on the end, but I'm curious to hear
  if others can reproduce this, or any ideas for a proper fix.
 
  Thanks!
 
  Nathan




-- 
Best regards, Ruslan.


Re: [rt-users] Fwd: Need Help on RT

2013-09-11 Thread Ruslan Zakirov
On Wed, Sep 4, 2013 at 1:52 PM, Nathan Cutler presnyprek...@gmail.comwrote:

 This got directed to my personal mail by mistake -- forwarding to the list.

 -- Forwarded message --

 Dear Concern,

 I need help on RT.I am new to linux and RT we have previously have RT
 3.6.5 now with the help of my friend I have upgraded it to 3.8.0

 I am facing two issues.

 1.While sending mail from RT to one time CC and BB they are not
 getting mail. I have checked the notify scrips etc all are seem to be
 right.


Missing scrip On correspond notify other recipients.



 2.When I send any mail to user along with attachment at the user end
 it will so message transition apper to have no context


Sounds like a bug fixed ages ago. Very strange to upgrade to 3.8.0 when
there
were 16 more releases with bug fixes in 3.8 series. 4.0 the current stable
and
4.2.0rc1 is out.




 Please help me on this. it would be realy help full for me.

 I am stuck on this for last One Month

 Thanks a lot in advance .

 Alok
 Sent from BlackBerry® on Airtel




-- 
Best regards, Ruslan.


Re: [rt-users] problem sharing session between RT and custom code

2013-09-11 Thread Ruslan Zakirov
Hi,

I think the only way somebody would help you is if you put up minimal
application code that replicates your problem. You have too many pieces.


On Thu, Aug 22, 2013 at 1:50 AM, Len Jaffe lenja...@jaffesystems.comwrote:

 I have written an application that runs alongside an RT4 instance, and
 makes use of RT's Logger, db handle and session.

 In moving from mysql to Oracle, I've run into a problem that after lodign
 a page from my app, the next  request, whether to my app, or RT,  hangs
 trying to get an exclusive lock on the session lock file that it had used
 without a problem on the previous request (and requests, if I start out
 clicking around in RT).

 I've determined that it is exclusive lock call by using strace.  I've also
 learned that while clicking through RT, and the first click into my app,
 the session lock file is file descriptor 11, but the request after hitting
 my app uses 13, but doesn't close 11, so it looks like my app is not
 untie-the session, but I'm relying on RT to tie/until the session - or so I
 think.

 I'm sure that there's something that I've missed. Something that RT does
 that I've orverlooked, or some assumption I've made that is invalid.

 Can anybody tell me (why my autohandler might be causing RT to use a
 different fd despite using the same session id, and why it might not be
 correctly relinquishing the lock or the tied hash?  Or nudge me in the
 right direction?

 Thanks,
 Len.


 --
 lenja...@jaffesystems.com   614-404-4214@lenjaffe
 Software Engineer, Founder Volunteerable http://www.volunteerable..com/,
 Host of Columbus Code Jam http://www.meetup.com/techlifecolumbus/
 www.lenjaffe.com http://www.theycomewithcheese.com
 Perl Advent Planet http://www.lenjaffe.com/PerlAdventPlanet/ - Advent
 Calendars: Perlish and otherwise.




-- 
Best regards, Ruslan.


Re: [rt-users] RT user login not possible after Ubuntu 11.04 uprade

2013-09-11 Thread Ruslan Zakirov
http://requesttracker.wikia.com/wiki/RecoverRootPassword


On Wed, Aug 21, 2013 at 4:31 PM, Alex Decalli alexdecall...@gmail.comwrote:

 Ok, found the problem but really didn't know how to fix, so have to reset
 password...

 UPDATE Users SET Password=ENCRYPT('password','SA') WHERE Name='root';

 It is the password encryption method, it is changed.
 Any comments?




 On Wed, Aug 21, 2013 at 11:34 AM, Alex Decalli alexdecall...@gmail.comwrote:

 I just found out that RT time is not sync. I got it from RT log file, it
 is 2 hours late, I am not sure why, my server time is correct (by command
 date) people say it might be because of mod_perl, can it be possibly the
 reason I can't login to RT?


 On Wed, Aug 21, 2013 at 9:39 AM, Alex Decalli alexdecall...@gmail.comwrote:

 Hi all,

 Yesterday, I upgraded my very old uUbuntu server and with that, mysql
 and apache2 were updated too, configuration files are still the same. I had
 some problems with some file names and locations and Perl modules, I fixed
 them all, now I can see RT login page, but I can't login to that with my rt
 user (already exists in rtdb) alex001. even not with root. I checked things
 like rtuser can access mysql and still has all privileges, rtdb is
 readable to anyone, mysql log says nothing about this problem, apache log
 just says login for alex001 failed and I have no idea where else I can
 check or what might cause this problem. Please tell me if you can think of
 anything, I mean what does RT do for user login, what might have been
 changed, what permissions it will need and anything else you might think
 of...

 PS: I am not even sure rt is querying mysql, how can I make sure??

 Thank you all
 Alex






-- 
Best regards, Ruslan.