Re: [rt-users] Help! I enabled Full Text search and now Simple search won't look at Subjects !!
On Fri, 19 Aug 2016 16:35:07 +0200 Claes Merin wrote: > We are using sphinx (since last night) for FTS searches. > > Setup is as described in this excellent guide: > > http://blog.christosoft.de/2016/07/rt4-request-tracker4-fulltext-search-sphinx-debian-jessie/ Is there a reason you're not using MySQL's built-in search, available since 4.2.10? It's more performant, and has none of the caveats: https://docs.bestpractical.com/rt/4.2/full_text_indexing.html#Caveats1 Especially since it allows for incremental indexing of new attachment rows, I know of no reason to prefer Sphinx. > We also ran in to the problem described here, and I was thinking if one > could resolve it by including the subject in the sphinx database... I expect that should work fine. > Modifying the query in the guide to simply include the t.Subject like > this... > > ## /etc/sphinxsearch/sphinx.conf > sql_query = \ > SELECT a.id id, t.Subject, a.content FROM Attachments a \ > JOIN Transactions txn ON a.TransactionId = txn.id AND txn.ObjectType = > 'RT::Ticket' \ > JOIN Tickets t ON txn.ObjectId = t.id \ > WHERE a.ContentType LIKE '%text%' AND t.Status != 'deleted' > ## > > The problem with this is, if there is a ticket that does not have an > attachment, it will not get indexed and is not searchable through FTS... The "attachments" table is used to index all content in RT. This includes textual content, such as the bodies of messages. As such, it is impossible for a ticket to not have at least one Attachment record. - Alex - 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] manipulate correspond content in history
On Fri, 19 Aug 2016 15:26:12 +0300 Woody - Wild Thing Safaris wrote: > My correspond scrip adds a table of CF values to the correspond email > from the template, and sends to the client. I would like those same > changes appended to the transaction content that appears in the history, > so it matches what was sent to the client and we know easily what was sent. This is what the "Show" link next to the "Outgoing email recorded" button is for. > $self->TransactionObj->ContentObj->SetContent($content); > > no errors, but the content is not changed All ->Set... methods return a tuple of ($success, $msg). You'll find that $success is false, and $msg is telling you that the field is read-only. RT views attachments as effectively immutable. Changing this invariant is complex, and not generally recommended. - Alex - 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] Anyone have a current vagrant installation of RT?
I've been poking around the net and found https://github.com/cwebberOps/rt-vagrant, it's six years old, and points to base boxes that are no longer hosted. Is there a recent install? --Barton - 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] Wrong type and other settings with rt-setup-databases
I wasn't able to figure out the problem. We were trying to install the Request Tracker that was current in the Ubuntu repository. After trying a clean reinstall a few times I decided to get it direct from Best Practical's site. The version in the repository may have been RT 4.2 so another motivation to go direct. The install worked. I tested the site, which worked. Then I moved in the old database and I was able to do the upgrade. We are now on the new server, running RT 4.4, and have our old tickets, etc. I wanted to post an update in case any others find this useful. Scott B On Fri, Aug 12, 2016 at 11:42 AM, Scott Boland wrote: > We are in the process of moving to a new server and we will upgrade RT and > other things. The new system will be RT 4.4.0 (Ubuntu 16.04 with MySQL > 5.7). The old system runs RT 4.0.4 (Ubuntu 12.04 with MySQL 5.5). I am > stuck and haven't been able to find a solution elsewhere. Thanks in > advance for any help and hopefully I didn't just miss something in the the > documentation. > > When I try to do > > rt-setup-databases --action upgrade > > the process appears to show settings for the wrong database type and some > other things. For example it will show Pg or sqllite even though we use > mysql and my SiteConfig has it set up that way. I am not sure what I am > missing or how else to verify it but the settings seem to be right, just > not used. > > Always the type is wrong but often the database name or user is wrong too. > > I see the same type of issue if I try to use the action to drop the > database. > > Thanks again for any help. Please let me know if you need other > information to answer this. > > Scott B > - 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] Help! I enabled Full Text search and now Simple search won't look at Subjects !!
We are using sphinx (since last night) for FTS searches. Setup is as described in this excellent guide: http://blog.christosoft.de/2016/07/rt4-request-tracker4-fulltext-search-sphinx-debian-jessie/ We also ran in to the problem described here, and I was thinking if one could resolve it by including the subject in the sphinx database... Modifying the query in the guide to simply include the t.Subject like this... ## /etc/sphinxsearch/sphinx.conf sql_query = \ SELECT a.id id, t.Subject, a.content FROM Attachments a \ JOIN Transactions txn ON a.TransactionId = txn.id AND txn.ObjectType = 'RT::Ticket' \ JOIN Tickets t ON txn.ObjectId = t.id \ WHERE a.ContentType LIKE '%text%' AND t.Status != 'deleted' ## The problem with this is, if there is a ticket that does not have an attachment, it will not get indexed and is not searchable through FTS... Maybe this solution could help someone, but also I'm interested if it would be possible to use an "TicketsIndex" table or somehow extend the "AttachmentsIndex" to include ticketId to index "tickets" rather than "attachments"..? Claes Merin Gästabudstaden AB On 2015-10-09 08:09, Alex Vandiver wrote: > On Wed, Oct 07, 2015 at 04:23:02PM -0500, k...@rice.edu wrote: >> It looks like you should be able to change the following function in >> lib/RT/Search/Simple.pm: [snip] > > RT 4.2.10 made the change to only search the Content field, and not > also the Subject field, intentionally; see the commit the did so [1] > for the full rationale. > > In short, it is impossible to have a performant full-text search if > you search both Subject and Content. In most RT installs, the > auto-reply from the ticket creation includes the subject of the > ticket, which means it is indexed along with the ticket, so removing > the Subject clause still results in finding the appropriate ticket. > > You're welcome to revert the change locally -- though I would suggest > doing so via an overlay and not by editing the file directly, or your > change will be lost when you next upgrade. If you do make the change, > I expect you'll find the simple search to be noticeably (and perhaps > unusably) slower. > - Alex > > > > [1] > https://github.com/bestpractical/rt/commit/8450f0a9f233d6a761ac22dbdf14926abc54d7fa > > - 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] [rt-announce] Training update: Moving LA and announcing Boston!
Due to multiple requests, we are moving the LA training to Q1 2017. While there was heavy interest many folks said they couldn't swing our original dates. Stay tuned for new dates soon! Also, we're thrilled to announce RT/RTIR training in Boston, October 24-26! Please join us in our hometown for unparalleled instruction in getting the most out of Request Tracker and RTIR. A reminder that in addition to our already extensive 2 day training, this session will include the optional third workshop day! Come with your questions and let the people who make RT help you get the most out of yours! You can register for the Boston training at bestpractical.com/training#NextTraining! Please let us know if you have questions. We also offer discounts to academic institutions and support customers. Thanks for supporting RT!___ rt-announce mailing list rt-annou...@lists.bestpractical.com http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-announce - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - September 12-14, 2016
Re: [rt-users] manipulate correspond content in history
Hi Woody, On Fri, Aug 19, 2016 at 7:26 AM, Woody - Wild Thing Safaris wrote: > HI all, > > My correspond scrip adds a table of CF values to the correspond email from > the template, and sends to the client. I would like those same changes > appended to the transaction content that appears in the history, so it > matches what was sent to the client and we know easily what was sent. > > to test i have made a scrip, on correspond, custom action, template blank > > action is > > my $content = $self->TransactionObj->ContentObj->Content; > $content .= "SOME OTHER STUFF"; > $self->TransactionObj->ContentObj->SetContent($content); > > no errors, but the content is not changed The Txn already happened and its content is immutable - sort of. That is, transactions (txns) are the atomic unit of data in RT. Those are the things that make sure the paper trail exists for all the other objects (users, tickets, queues, etc.) That said, there is enough rope to do what you want. I don't know exactly the procedure because I haven't implemented your use-case. You'll want to expose the Transaction's parent's _Set method. In a local module that gets loaded have some code like: # {{{ # paper-trail auditor backdoor :) # Needed to change the txn's content package RT::Transaction; use strict; no warnings qw(redefine); sub _Set { my $self = shift; $self->SUPER::_Set(@_); } # }}} There may be more steps beyond this, but I think you'll need this at a minimum. -m - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - September 12-14, 2016
[rt-users] manipulate correspond content in history
HI all, My correspond scrip adds a table of CF values to the correspond email from the template, and sends to the client. I would like those same changes appended to the transaction content that appears in the history, so it matches what was sent to the client and we know easily what was sent. to test i have made a scrip, on correspond, custom action, template blank action is my $content = $self->TransactionObj->ContentObj->Content; $content .= "SOME OTHER STUFF"; $self->TransactionObj->ContentObj->SetContent($content); no errors, but the content is not changed thanks Woody. -- --- Richard Wood (Woody) Managing Director Wild Thing Safaris Ltd. UK: 2B Habbo St, Greenwich, London Dar es Salaam: 5 Ethan St, Mbezi beach Arusha: 3 Ebeneezer Rd, Njiro PO BOX 34514 DSM Office: +255 (0) 222 617 166 Office Mobile: +255 (0) 773 503 502 Direct: +255 742 373 327 Skype: woody1tz http://wildthingsafaris.com - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - September 12-14, 2016
Re: [rt-users] ModifyCustomField without SeeCustomField
Hi all, I did not succeed in working out how to get around it by using callbacks, but instead added some code to remove the values if the user is a member of some group. I did this hack, which might be useful to someone someday note i only edited the Freeform custom field file as that's all i needed and i preserved the oldvalue in the oldvalue= argument in local/html/Elements/ShowCustomField line 53 % while ( my $CustomField = $CustomFields->Next ) { % my $Values = $Object->CustomFieldValues( $CustomField->Id ); % my $count = $Values->Count; % next if $HideEmpty and not $count; %# skip if member of group "NoSeeCF" % my $group = new RT::Group($RT::SystemUser); % $group->LoadUserDefinedGroup("NoSeeCF"); % next if ($group->HasMember($session{'CurrentUser'}->PrincipalObj) ); <% $CustomField->Name %>: in local/html/Elements/EditCustomFieldFreeForm line 52 % if ( defined $Cols ) { size="<% $Cols %>" \ % } %# remove value if member of NoSeeCF % my $group = new RT::Group($RT::SystemUser); % $group->LoadUserDefinedGroup("NoSeeCF"); % if ($group->HasMember($session{'CurrentUser'}->PrincipalObj) ) { class="CF-<%$CustomField->id%>-Edit" oldvalue="<% defined($Default) ? $Default : ''%>" value="" /> % } else { class="CF-<%$CustomField->id%>-Edit" value="<% defined($Default) ? $Default : ''%>" /> % } Thanks Matt w. On 14/08/16 21:25, Matt Zagrabelny wrote: On Sun, Aug 14, 2016 at 1:07 AM, Woody - Wild Thing Safaris wrote: Hi all, Is it possible to allow a user to edit a custom field, without being able to see it's value? My testing looks like ModifyCustomField is not enough for the field to show up in the update page, and SeeCustomField my also be checked? You can always hack around that "limitation" with the callbacks. /Elements/EditCustomFields/{After,Before}CustomFields -m -- --- Richard Wood (Woody) Managing Director Wild Thing Safaris Ltd. UK: 2B Habbo St, Greenwich, London Dar es Salaam: 5 Ethan St, Mbezi beach Arusha: 3 Ebeneezer Rd, Njiro PO BOX 34514 DSM Office: +255 (0) 222 617 166 Office Mobile: +255 (0) 773 503 502 Direct: +255 742 373 327 Skype: woody1tz http://wildthingsafaris.com - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - September 12-14, 2016