Re: [rt-users] trying to calculate time worked per transaction / ticket using SQL

2013-12-02 Thread Tom Lahti
Why don’t use you want to use REST?  You’re shooting yourself in the foot; when 
you upgrade RT, your queries will no longer work and will have to be updated.  
If you use the REST interface, you can upgrade with impunity and not have to 
worry about your queries not working anymore.

—
Tom

On Dec 1, 2013, at 11:18 PM, Chris Herrmann 
chrisherrma...@gmail.commailto:chrisherrma...@gmail.com wrote:

Hi all,

Just bumping this one - does anyone have any suggestions? Am I approaching this 
the wrong way? Using MySQL btw if that makes a difference.

Thanks,

Chris

-- Forwarded message --
From: Chris Herrmann chrisherrma...@gmail.commailto:chrisherrma...@gmail.com
Date: 24 November 2013 22:11
Subject: trying to calculate time worked per transaction / ticket using SQL
To: rt-users@lists.bestpractical.commailto:rt-users@lists.bestpractical.com


Hi all,

I'm trying to put together a SQL query to present a view, that allows summaries 
of data to be performed in reporting tools. I have a feeling that this question 
has been asked before and answered, but my google-fu is failing me, so 
apologies in advance... I've only found questions about using RT-REST, for 
example (which I don't want to do).

I'm using RT 3.8.7 (yes I know it's old and it's in the pipeline to upgrade but 
we have a bunch of other systems that are integrated with RT and so it's not a 
simple just upgrade RT project for us.

Anyway, what I want to end up with is the following fields:

Tickets.EffectiveID
Queues.Name
Tickets.Owner
Transactions.Creator
Transactions.TimeTaken
Transactions.Created
Tickets.Status
Tickets.Started
Tickets.Resolved
Tickets.Created
Transactions.Type

So i can easily point various reports at it and work from there.

the sql I'm using is...
SELECT
Tickets.EffectiveId AS TicketID,
Queues.`Name` AS Queue,
Tickets.`Owner` AS OwnerID,
Transactions.Creator AS TransactionCreatorID,
Transactions.TimeTaken AS TimeTaken,
Transactions.Created AS TransactionCreated,
Tickets.`Status` AS TicketStatus,
Tickets.Started AS TicketStarted,
Tickets.Resolved AS TicketResolved,
Tickets.Created AS TicketCreated,
Transactions.Type AS TransactionType
FROM
Tickets
JOIN Transactions ON ((Transactions.ObjectId = Tickets.id)))
JOIN Queues ON ((Queues.id = Tickets.Queue)

but I'm not getting the results I expect...

or even something far simpler like:
SELECT
Transactions.Creator,
sum(Transactions.TimeTaken/60) AS TimeInHours,
Month(Transactions.Created) AS TransactionMonth,
Year(Transactions.Created) AS TransactionYear
FROM
Tickets JOIN Transactions ON Transactions.ObjectId = Tickets.id
where Transactions.Created  2013-10-01
group by Creator, Month(Transactions.Created), Year(Transactions.Created)

just to try and compare the numbers... that I'm seeing with timeworked.pl...

Now my problem is that the numbers I'm getting don't match those returned by 
REST - for example using the timeworked.plhttp://timeworked.pl/ script..

Is there a definitive SQL somewhere that I should use to return these?... and 
any pointers on what transaction types I should be avoiding or how to avoid 
double counting merged transactions I would be very grateful...

Thankyou!

Chris




This e-mail message is confidential and is intended solely for the use of the 
addressee(s) named above. If you are not the intended recipient, or the person 
responsible to deliver it to the recipient, you are hereby advised that any 
dissemination, distribution or copying of this communication is prohibited. If 
you have received this e-mail in error, please notify the sender by return 
e-mail. Thank you.


Re: [rt-users] automatically linking tickets together

2013-11-14 Thread Tom Lahti
Custom code; this is one of the reasons the REST interface exists.  With
it you can do anything.

Have the mail transport deliver the email to a script that parses the
mail and executes some REST calls, either directly or through a library.

See the bottom of the page http://requesttracker.wikia.com/wiki/REST for
a list of libraries you can use.



 Piet,

 On 14/11/13 10:10, Piet Honkoop wrote:

 central RT4 ticketing system with a number of customers with own (other)
 trouble ticket systems.
 Many of those misbehave by sending too many mails where they molest the
 subject in order to insert their own ticket id.

 What I want to do is based on their ticket id link those emails to the
 initially created ticket within RT.

 What is the best way to do that given that the incoming mail does not
 necessarily have an RT ticket number in the subject?
 We have a similar problem. In our case the ticket number is usually in
 the body of the e-mail, so perhaps picking that up is the way to go.
 I've no idea how to implement that though!

 Regards,
 Tony.



This e-mail message is confidential and is intended solely for the use of the 
addressee(s) named above. If you are not the intended recipient, or the person 
responsible to deliver it to the recipient, you are hereby advised that any 
dissemination, distribution or copying of this communication is prohibited. If 
you have received this e-mail in error, please notify the sender by return 
e-mail. Thank you.


[rt-users] Upgraded 3.8.8 - 4.2.0, IE issues

2013-10-29 Thread Tom Lahti
I just upgraded from 3.8.8 to 4.2.0, and we're having some difficulty
with Internet Explorer.

It seems it is unable to submit forms except for the Jumbo form.
There's no errors, it just redisplays the page.   This is manifesting in
a number of forms including the actions comment and reply, when
trying to save user preferences, when clicking Add these terms and
Search in the search builder, and so forth.  The only thing that works
for commenting and replying is to use the Jumbo form, which is far from
ideal.

I've tried a number of things like turning off the CKeditor, disabling
extensions, changing Internet Explorer options and settings, and I
haven't come across the magic yet.  Has anyone else experienced this and
knows what the issue is?  Googling has not been fortuitous, either.

--
Tom Lahti
t...@dmsolutions.com



This e-mail message is confidential and is intended solely for the use of the 
addressee(s) named above. If you are not the intended recipient, or the person 
responsible to deliver it to the recipient, you are hereby advised that any 
dissemination, distribution or copying of this communication is prohibited. If 
you have received this e-mail in error, please notify the sender by return 
e-mail. Thank you.


Re: [rt-users] Upgraded 3.8.8 - 4.2.0, IE issues

2013-10-29 Thread Tom Lahti
On 10/29/2013 1:58 PM, Tyler Sweet wrote:
 I was sent a patch for this at one point, and was told the fix is coming in 
 4.2.1.

 IIRC, the problem is in /opt/rt4/share/static/js/forms.js (or where ever you  
 have RT installed at). I can't remember which line needs to change, but 
 here's what mine looks like:

 jQuery(function() {
   jQuery('form').submit(function() {
 jQuery(this).find('input[type=submit]').attr('disabled','disabled');
 return true;
   })
   jQuery('input[type=submit]').click(function() {
 var $this = jQuery(this);
 var name = $this.attr('name');
 if (!name) { return true; }
 $this.after( jQuery('input/', {type: hidden, name: name, value: 
 $this.val()} ) );
 return true;
   })
 });


 -Tyler Sweet

Yes, that does indeed fix the issue for us.  For the record, its just
changing $this.append to $this.after.

--
Tom




This e-mail message is confidential and is intended solely for the use of the 
addressee(s) named above. If you are not the intended recipient, or the person 
responsible to deliver it to the recipient, you are hereby advised that any 
dissemination, distribution or copying of this communication is prohibited. If 
you have received this e-mail in error, please notify the sender by return 
e-mail. Thank you.


Re: [rt-users] rt-client ruby gem update

2013-07-25 Thread Tom Lahti
Wow did I mess up.

Robert Vinson's fork did not have all the methods reproduced, and I didn't 
notice.  0.6.0 is almost unusable as a result, if you used anything beyond the 
couple of methods implemented there.

I've re-introduced all the missing methods back into 0.6.1 and pushed it.  
Please let me know if there's any issues.

--
Tom Lahti


On Jul 4, 2013, at 5:09 PM, Tom Lahti tla...@dmsolutions.com wrote:

 I have shamelessly and unapologetically stolen Robert Vinson's excellent work 
 on his fork, for the most part.  I did refactor slightly to maintain 
 compatibility with the previous API, but otherwise it's identical and pushed 
 as rt-client 0.6.0.  It is working for me on ruby 1.9.3p374 on Windows and 
 ruby 1.8.3p327 on Linux, which is what I need for right now.



[rt-users] rt-client ruby gem update

2013-07-04 Thread Tom Lahti
I have shamelessly and unapologetically stolen Robert Vinson's excellent work 
on his fork, for the most part.  I did refactor slightly to maintain 
compatibility with the previous API, but otherwise it's identical and pushed as 
rt-client 0.6.0.  It is working for me on ruby 1.9.3p374 on Windows and ruby 
1.8.3p327 on Linux, which is what I need for right now.

The prerequisites for the gem have been whittled down to a single other gem, 
rest_client.  So as long as that works on ruby 2.0, I see no reason why 
rt-client 0.6.0 won't either.

If anyone has issues with rt-client 0.6.0 on any version of ruby or any 
platform, please let me know directly at t...@dmsolutions.com.  Unfortunately I 
don't have time to read rt-users as frequently as I'd like.

--
Tom





This e-mail message is confidential and is intended solely for the use of the 
addressee(s) named above. If you are not the intended recipient, or the person 
responsible to deliver it to the recipient, you are hereby advised that any 
dissemination, distribution or copying of this communication is prohibited. If 
you have received this e-mail in error, please notify the sender by return 
e-mail. Thank you.


[rt-users] rt-client ruby gem 0.4.0

2011-08-23 Thread Tom Lahti
I just pushed version 0.4.0 as a bug fix for 0.3.9

* fixed usersearch method to actually work ^^
* documented usersearch method and added it to the rtxmlsrv.rb XML-RPC service

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117





RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA  September 26  27, 2011
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Melbourne VIC, Australia  November 28  29, 2011
*  Barcelona, Spain  November 28  29, 2011


[rt-users] rt-client ruby gem 0.3.9 released

2011-08-22 Thread Tom Lahti
I have just pushed rt-client 0.3.9 to rubygems.org.

Changes:  

* applied patch from Brian McArdle to deal with spaces in Custom Field names.
* works properly with RT having more than one digit in version strings (e.g. RT 
3.8.10)
* new method usersearch, supply a hash with key :EMailAddress to lookup an RT 
user by email.  Get back a hash with keys corresponding to fields on user edit 
page in RT.

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117


RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA  September 26  27, 2011
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Melbourne VIC, Australia  November 28  29, 2011
*  Barcelona, Spain  November 28  29, 2011


Re: [rt-users] rt-client ruby gem

2011-01-10 Thread Tom Lahti
It was in something I read somewhere regarding the REST interface.  Maybe it 
was in the wiki and someone else wrote it.

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117

 I've filed a bug report.  
 http://issues.bestpractical.com/Ticket/Display.html?id=16418
 
 This is probably the 3rd time its come up.  I've discussed it with Jesse on 
 the RT user's list and he recommended filing a bug report the last time it 
 came up.  The problem isn't really with rt-client, its with RT.  This 
 non-compliance with RFC 822 when that was intended will cause not only 
 rt-client to fail, but other similar libraries as well that use a 3rd party 
 RFC 822 parser.  Having a space in the field name of an RFC 822 header is 
 not compliant with the RFC.
 
 I don't think we've ever claimed to be RFC 822 compliant. Have we?



smime.p7s
Description: S/MIME cryptographic signature


Re: [rt-users] rt-client ruby gem

2011-01-10 Thread Tom Lahti
Surely you remember this thread as well?

http://www.mail-archive.com/rt-users@lists.bestpractical.com/msg28493.html

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117




On Jan 10, 2011, at 4:27 PM, Tom Lahti wrote:

 It was in something I read somewhere regarding the REST interface.  Maybe it 
 was in the wiki and someone else wrote it.
 
 --
 Tom Lahti, SCMDBA, LPIC-1, CLA
 BIT LLC
 425-251-0833 x 117
 
 I've filed a bug report.  
 http://issues.bestpractical.com/Ticket/Display.html?id=16418
 
 This is probably the 3rd time its come up.  I've discussed it with Jesse on 
 the RT user's list and he recommended filing a bug report the last time it 
 came up.  The problem isn't really with rt-client, its with RT.  This 
 non-compliance with RFC 822 when that was intended will cause not only 
 rt-client to fail, but other similar libraries as well that use a 3rd party 
 RFC 822 parser.  Having a space in the field name of an RFC 822 header is 
 not compliant with the RFC.
 
 I don't think we've ever claimed to be RFC 822 compliant. Have we?
 



smime.p7s
Description: S/MIME cryptographic signature


Re: [rt-users] rt-client ruby gem

2011-01-10 Thread Tom Lahti
Ah, I know where I got the idea.  RT::Client::REST on CPAN uses 
Mail::RFC822::Address from CPAN, I believe.  

The evilness of spaces in field-names is far less than the one back in October, 
with null lines preceeding and after a header in the metadata, which is how the 
body is supposed to be separated from the metadata.  Not sure how that one 
happens, but it makes parsing rather difficult.

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117


On Jan 10, 2011, at 4:34 PM, Tom Lahti wrote:

 Surely you remember this thread as well?
 
 http://www.mail-archive.com/rt-users@lists.bestpractical.com/msg28493.html



smime.p7s
Description: S/MIME cryptographic signature


Re: [rt-users] 3.8.7 Spreadsheet is broken

2010-11-03 Thread Tom Lahti
 Using OO 3.2
(*) Separated by
 
[x] Tab [ ] Comma
[ ] Semicolon   [ ] Space
 
 = broken :(
 
 I'll ask the original problem finder what app she was using.

Does the data contain embedded tabs?  If so, tab-delimited ain't gonna work.

Is she sure she did TAB separated?  Doing comma or space separated would jumble 
the data for sure.

Also look out for column widths.  The spreadsheet can -look- like the data is 
jumbled when in fact it isn't if the column widths aren't uniform, which in 
some programs they often aren't immediately upon an import like that.  They 
-look- jumbled to me in OO as well, but then I go through and adjust column 
widths and its peachy.

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117


Re: [rt-users] REST interface and long file names?

2010-10-29 Thread Tom Lahti
Jesse's intent for the REST interface was to be RFC822 compliant, and that 
ain't.  So I while I could probably make rt-client tolerate it, I probably 
should push this to Jesse as REST isn't working the way he intended in this 
case.  It will probably cause issues with other systems that interface with 
RT's REST API as well.

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117




On Oct 28, 2010, at 3:47 PM, Thierry Thelliez wrote:

 I found a strange answer from RT while calling the REST interface.
 You can see below that extra lines are added before and after the
 Subject line.  This does not work well with rt-client (ruby library)
 while parsing the answer. There should not be these extra lines.
 
 Is that because we have a long filename? Or a comma in the title?
 
 
 
 '
 RT/3.8.7 200 Ok
 
 id: 1302
 
 Subject: _xx__xx_xxx_x_ xxx 
   xx xxx xx xx., xxx..xls
 
 Creator: 574
 Created: 2010-06-08 02:09:24
 Transaction: 1970
 Parent: 1300
 '
 
 
 Thanks,
 Thierry



Re: [rt-users] rt_client ruby: Issue with attachments in a multipart email

2010-10-24 Thread Tom Lahti
Send me a patch.  I'm the author of that gem.  Or if you need help, send me 
your email as a text file and I'll look into it.  

As far as I know roart does not do attachments at all, but that may have 
changed.  I'm not involved with that gem -- it was made for Rails programmers 
who are familiar with ActiveRecord, whereas rt-client was made (by me) for a 
more procedural approach.  As I'm not a rails guy, that paradigm never occurred 
to me.

In fact, I think I have some updates on my dev box that I haven't pushed to 
gemcutter, but I'm sure I haven't addressed your issue.

On Oct 24, 2010, at 8:14 PM, Thierry Thelliez thierry.thelliez.t...@gmail.com 
wrote:

 Ok, 2nd correction. sorry.
 
 
 The error was not with the multipart, and not with the regular
 expression.  It is in the line:
 
 list = th[attachments].to_s.split(,)
 
 It is splitting the lines based on the presence of commas.  My
 filename contains a comma...
 
 
 
 Thierry


[rt-users] cloning Queues

2010-10-20 Thread Tom Lahti
I tried the CloneQueues page on the wiki out on 3.8.8, which dies with an 
error about needing a package declared explicitly when actually trying to admin 
a queue.

Does anyone have a mod of this already that works in 3.8.x something, thereby 
preventing me from re-inventing the wheel?  Mine will squeak horribly, anyway…. 
(I've forgotten more perl than I remember since learning ruby)

--
Tom Lahti, SCMDBA, LPIC-1, CLA
BIT LLC
425-251-0833 x 117






Re: [rt-users] Is SQLite no longer supported?

2009-11-25 Thread Tom Lahti
 In defence of SQLite (not that I'm especially cheering for it), it
 actually is ACID compliant (http://www.sqlite.org/transactional.html,
 http://www.sqlite.org/atomiccommit.html) and concurreny issues only
 affect writers (readers are fully concurrent;
 http://www.sqlite.org/lockingv3.html,
 http://www.sqlite.org/faq.html#q6), so my question really was more
 directed to real-world experiences with rt3 and SQLite rather than
 rumours :)

It wasn't the last time I looked at it.  I still wonder about 
transaction isolation levels, but as long as RT doesn't use BEGIN, 
COMMIT or ROLLBACK, I guess that doesn't matter much.

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Is SQLite no longer supported?

2009-11-24 Thread Tom Lahti
 Slightly offtopic - is there some best practice limit saying when
 SQLite stops being efficient and it's time to use something bigger? Or
 in other words, how large are average SQLite installations in terms of
 users, tickets, etc.?

In my opinion, I would say that SQLite is appropriate for testing and 
development work, where you have developers working on customizations of 
RT.  I don't think SQLite is appropriate for production environments of 
any size.  But that's just me.

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Is SQLite no longer supported?

2009-11-24 Thread Tom Lahti
 SQLite's complete lack of threading model means responding to a single 
 request at a time.
 
 Simply put, if you have enough users that the possibility of multiple people 
 requesting information at the same time, or a user request happening when an 
 external ticket comes in (email via rt-mailgate etc.), then you're going to 
 be causing users to stall, waiting.
 
 You may be able to get away with it for a small number of concurrent users 
 (1-5 maybe) in a low volume environment, but if you're wanting to do anything 
 serious with email coming in at any moment, then you'd be better off setting 
 up a MySQL/PgSQL DB.  The effort isn't much different.
 
 Stuart

I was thinking more in terms of reporting reliability.

In short, SQLite is not ACID compliant.  If underneath you are not ACID 
compliant, then there is no assurance that what's in a ticket's history 
necessarily reflects reality.  History items may have been lost due to 
power outages, locking issues, buggy web server software, etc etc etc.

Without ACID compliance, you really don't have an audit trail.  You can 
pretend you do, but you really don't :)

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to add attachments (not links) with a template to an outgoing mail?

2009-11-20 Thread Tom Lahti
Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
 Hi Tom,
 
 thanks for the hint. in the mean time we found a easy way to do this ;-)
 
 Torsten 

Out of curiousity, what is that easy way, in case we ever need that here?

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to add attachments (not links) with a template to an outgoing mail?

2009-11-19 Thread Tom Lahti
Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
 Hi, i followed the the instructions from wiki to add all attachments
 from a ticket (during the whole livetime) as links to the outgoing
 mail. No i need to attache all the attachements to the outgoing mail,
 but i can't find anything useful at the wiki for this.
 
 Any suggestions?

As far as I know, you'd have to write a custom email template that 
fetches the attachment contents through the perl API and builds a 
MIME-encapsulated message body.  Of course it has to execute fully 
before the resulting page will display, which might take awhile.

Since I've forgotten most of my perl at this point, and I'd want the 
page to display quicker, personally I would probably build myself a 
custom REST service and have the perl template call that and supply some 
parameters.  But that's just me.

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT Upgrade failing from 3.6.6 to3.8.6 UPDATE:mason_data directory

2009-11-18 Thread Tom Lahti
Barron, Josh wrote:
 I wasn't able to get this working after trying a good portion of the
 evening.
 I finally ended up setting up a new virtual server and just migrating
 the database over to it.

Did you ever try turning SELinux off?  Just curious, I've never used it 
so I'm not sure what the impact would be.


 [r...@help01 jbarron]# /usr/sbin/getenforce 
 Enforcing

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT Upgrade failing from 3.6.6 to 3.8.6

2009-11-17 Thread Tom Lahti
 Hi Tom,
 
 There is only one my.cnf and it doesn't contain those sections with that
 line.  From what I can determine mysql is set to listen to any address.
 When I forced a localhost connection, I was able to connect as both root
 and rt_user.
 
 -Josh

Huh.  So you did:

 mysql -h localhost -u rt_user -p

and you're sure there's no ~/.my.cnf (note leading dot, its a hidden file).

That is strange.  I'm not sure how the schema upgrade script makes its 
connection to mysql, if its using the mysql client program then it 
should work exactly the same.

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT Upgrade failing from 3.6.6 to 3.8.6 UPDATE: mason_data directory

2009-11-17 Thread Tom Lahti
 [Tue Nov 17 16:24:02 2009] [error] [client 216.222.31.30] Could not
 create '/opt/rt3/var/mason_data/obj/.__obj_create_marker': Permission
 denied\nStack:\n

You need to look specifically at the permissions on 
/opt/rt3/var/mason_data/obj and verify that the user the web server runs 
as can write to that directory.  The higher level directories are 
irrelevant.

Also, if you are using POSIX ACLs you might need to

getfacl /opt/rt3/var/mason_data/obj


-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT Upgrade failing from 3.6.6 to 3.8.6 UPDATE: mason_data directory

2009-11-17 Thread Tom Lahti
 [Tue Nov 17 16:24:02 2009] [error] [client 216.222.31.30] Could not
 create '/opt/rt3/var/mason_data/obj/.__obj_create_marker': Permission

Does the *file* .__obj_create_marker already exist in that location, 
with some un-overwritable permissions perhaps?

Or perhaps its in use?

lsof | grep marker



-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT Upgrade failing from 3.6.6 to 3.8.6

2009-11-16 Thread Tom Lahti
 Connect Failed Access denied for user 'rt_user'@'localhost' (using 
 password: YES)


 So basically, it appears that my password is incorrect, HOWEVER, I can 
 connect to mysql using the exact user and password.  Its almost like the 
 perl script is NOT taking the prompts. 

Connecting at localhost?

In MySQL, the user 'rt_user'@'something-else' is not the same user as 
'rt_user'@'localhost'.


-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT Upgrade failing from 3.6.6 to 3.8.6

2009-11-16 Thread Tom Lahti
Try Yes I tried connecting to mysql directly from localhost and that 
worked:
 
 [jbar...@help01 ~]$ mysql -u rt_u...@localhost -p
 Enter password: 
 ERROR 1045 (28000): Access denied for user
 'rt_u...@localhos'@'localhost' (using password: YES)
 [jbar...@help01 ~]$ mysql -u rt_user -p  
 Enter password: 
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 138
 Server version: 5.0.77 Source distribution
 
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
 mysql exit;
 Bye
 [jbar...@help01 ~]$

On *nix, mysql programs read startup options from the following in order:

/etc/my.cnf
SYSCONFDIR/my.cnf
$MYSQL_HOME/my.cnf
The file specified with --defaults-extra-file, if any
~/.my.cnf

If any of these exist, and there is a [mysql] or [client] section that 
contains a host=... line, then mysql -u rt_user -p will connect to 
that host, not localhost.

To force a localhost connection, do:

mysql -h localhost -u rt_user -p


What I'm getting at is: are you sure your MySQL instance for RT is on 
localhost?

-- 
--
   Tom Lahti, SCMDBA, LPIC-1
   BIT LLC
   (425)251-0833 x 117
   http://www.bitstatement.net/
--
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] REST and attachments

2009-09-29 Thread Tom Lahti
 Content=id: ticket/new\nsubject: new ticket\nqueue:
 Automation\nrequestor: u...@domain.com\ntext: This is the text of the
 ticket\rA second line of text in the ticket\nAttachment:
 d:\\Inetpub\\RT-REST\\Files\\Penguins.jpg

RT doesn't read local files and encode them for you.  You have to send
the file contents.  Also, I haven't figured out how to create a ticket
with an attachment so what I do is create a ticket and then immediately
create a reply with the attachment.

If you can read ruby (and there's no reason you can't), have a look at
http://rubyforge.org/projects/rt-client/ which is a ruby library I wrote
that does a lot of the work for you, if you happen to be using ruby for
RT REST that is.  But that code does create tickets and add attachments
to them.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Login password save

2009-09-24 Thread Tom Lahti
 Has anyone ever come across an extension or made a login password saver
 using cookies? I'm just wondering I had a few users ask about saving
 their login password.

 Evil bad awful idea.

... because anyone with physical access to their computer can create RT
transactions as the user with the saved password without having to know the
password.

Even without doing that, the session length presents the same issue if users
do not lock their workstations when they leave their desk.  Here I have an
alias set up that emails the whole company; if I find an employee has left
their workstation unlocked, I send out a company-wide email from them with
some silly statement  (I watch Sesame Street is a favorite).  Needless to
say, no one hardly ever does that anymore :)

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Login password save

2009-09-24 Thread Tom Lahti
 I was thinking more that it generally ends up storing the password in the 
 clear,
 and is constantly sending that information back to the server.

That too.

 Besides, browsers have built-in facilities for remembering passwords
 if that's your bag;
 and in FF they can all be encrypted with a single master password.

Which are stored in the user's profile, not globally.  Still have to log
in/unlock as that user to gain the saved passwords.  Unless you make everyone
a local admin, then nothing else matters :)

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] sqlite

2009-09-22 Thread Tom Lahti
 SQLite is primarily intended for development and testing environments.
 It's not well-suited to a multi-user production environement for RT.

Actually, I think SQLite's mission is to provide a lightweight database for
individual use applications.  It's used by a lot of such things such as Apple
Mail, Safari, Firefox, Google Gears, and the Skype client.  But it certainly
isn't robust enough for the enterprise side of things.  Google Gears on SQLite
sure, but Google itself?  Skype client yes, but Skype servers?  Not gonna 
happen.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] sqlite

2009-09-22 Thread Tom Lahti
 Sorry. What I meant to say is RT's SQLite support  - I _love_ SQLite
 for all sorts of applications. multi-user apps with SQLite are totally
 doable -- you just need to be careful with write concurrency ;)

If you leave synchronous writes on, you're limited on transaction speed.  A
commit takes at least two full drive rotations, so for a 7200rpm drive you can
only do 60 transactions per second.  Not terribly scalable :)


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT and Subversion

2009-09-16 Thread Tom Lahti
I do this with subversion hooks that call the RT REST API and some custom
fields.  The programmer puts Ticket: 123 as the first line of the comment at
commit.  The hooks validate the ticket data using REST API before allowing the
commit, and they also post information about the commit back to the ticket.

My hooks are written in ruby and use the rt-client library from rubyforge
(which I am the author of).


Ben wrote:
 Can any one help me on this?
  
 Thanks,
  
 Ben
 
 --- On *Tue, 9/15/09, Ben /uy...@yahoo.com/* wrote:
 
 
 From: Ben uy...@yahoo.com
 Subject: RT and Subversion
 To: RT Users rt-users@lists.bestpractical.com
 Date: Tuesday, September 15, 2009, 11:27 AM
 
 Hi, All,
 
 I have a quick question. I use RT and subversion and scmbug.
 I have created several queues undr RT, also several projects under
 one repos in subversion.
 My question is: how can I let the ticket owner can make changes to
 one projects in subversion?
 for example, I have queueA, queueB, queueC, under subversion repos,
 I have projectA, projectB, projectC.  User A have a ticket in
 queueA, then he can check in to projectA, userB has a ticket in
 queueB, then he can check in to projectB.
  
 Thanks!
  
 Ben
 
 
 
 
 
 
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] {Disarmed} Re: RT and Subversion

2009-09-16 Thread Tom Lahti
Ben wrote:
 thanks, Tom
  
 I used scmbug to hook subversion with RT, is there a way to complete
 task with scmbug?
  
 also Tom, does your way need a lot work to do?
  
  
 Regards,
  
 Ben

I don't know anything about scmbug so I can't provide any advice there.  My
subversion hooks are very custom.  In addition to integrating RT with
subversion, it also pulls binaries from subversion at commit (if the
production approved custom field is set) and injects them into our
production deployment control system.

Unfortunately my custom hooks are company proprietary and I don't have
permission to share them, but in essence they use svnlook to get information
about the subversion transaction and the rt command line to get and post
information to/from the ticket.  In the pre-commit hook there's just
conditional logic to do things like: make sure the ticket exists, make sure
its in the right queue, make sure the owner of the ticket is the person doing
the commit, etc.  The post-commit hook is used to record the commit log
message into the ticket, take a diff and attach it to the ticket, list the
files that were changed in the commit in a reply, record the revision number
committed into the ticket, etc.  Documentation galore :)

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT and Subversion

2009-09-16 Thread Tom Lahti
 http://search.cpan.org/dist/RT-Integration-SVN/ 
 lets you close tickets with svn commit messages

That should be easy enough in a custom post-commit hook, too.  Just parse the
commands out of the subversion log message fetched with 'svnlook' and do the
corresponding thing with the rt command line or the REST API.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Upgrade from 3.6.3 to 3.8.4 - image attachments missing/corrupt

2009-09-16 Thread Tom Lahti
Justin Hayes wrote:
 Thanks Aaron. I've always wondered why file attachments are stored in
 the db at all. I'd have thought those would have been better placed out
 in the filesystem. 

Egads! What if the storage database is not local to the web server?  How will
you perform comprehensive backups?  What if your RT has a million attachments,
or more?  Not to mention the performance hit of using a filesystem as a
database, especially with high concurrency at the HTTP level.

I have a custom database application designed specifically to store PDFs in
the database.  It has 30 million documents in it, the database storage is over
4TB.  The web-based front-end for it is efficient enough to saturate a
100MBit/sec Internet connection with a single Core-2 duo web server.  When I
tested this against our old filesystem version of the application, it
outperformed the filesystem by more than 100%.  Backup is done by dumping the
database in chunks in a rotating schedule.  Scalability can be accomplished
with simple replication to additional read-only SQL servers and using a SQL
relay to dispatch SQL commands in a load-balancing fashion.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Making RT and Altiris play nice

2009-06-04 Thread Tom Lahti
 Medium Incident #11495 has been reassigned by Somebody
 
 So of course our RT makes it:
 
 [rt.local #104] Medium Incident #11495 has been reassigned by Somebody
 
 Anytime the Altiris system updates their ticket we create a new one and
 anytime RT updates our ticket they create a new one.
 
 If anyone has ideas around this issue, I would love to hear them.

You need a script at both ends to massage the outgoing subject into the one
needed by the other end, after it comes out of the tracking system in
question.  It would need to store ticket number associations for future
emails, possibly in a database table.  You could attach this script to a
special email alias just for this purpose on both ends, which then generates
a new email with the desired subject line to the real email address for the
tracking system.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Storing custom field file to local file system

2009-06-02 Thread Tom Lahti
   my $url = RT-Config-Get('WebPath') .
 /Download/CustomFieldValue/.$cf-Id.'/'.$cf-Content;
   getstore($url,/tmp/temp.odt);

 Or perhaps more easily put:  How do you extract a file from a custom
 field and store it on the local file system?

Since the custom field just names the file, set up a separate name space in
your web server (Apache?) that doesn't go through RT to fetch the document
through with getstore().

my $url = http://not-rt.server.com/some/dir/; . $cf-Content;
getstore($url...);

If you need to secure it better make sure not-rt.server.com isn't publicly
available, or use localhost and clamp that down in Apache config, or whatever.

If you need RT to authenticate document access, then you're better off
storing the document as an attachment.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Binary files broken since upgrade to RT 3.8

2009-06-02 Thread Tom Lahti
 I'm not too clear what you mean.  In creating the test system, I did
 backup  restore the db.  But I built a 3.6.6 system and then tested the
 upgrade from that database.  So I stopped Apache and Postfix, removed
 the old /opt/rt3 folder, make install to get the new 3.8 files, and then
 followed the upgrade instructions including the rt-setup-database and
 upgrade-mysql-schema.pl scripts.
[snip]

Check the list archives.  Odds are, you ran upgrade-mysql-schema.pl but did
not run the SQL script that it generates to actually upgrade the schema.

update-mysql-schema.pl does NOT upgrade the mysql schema.  It generates a
script to do so.  I asked Jesse about changing the name of the script but he
didn't seem to think it was a good idea, and yet people keep thumping into this.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to get RT ticket links.

2009-06-01 Thread Tom Lahti
URI:  REST/1.0/ticket/nn/links/show

Give it a try.  I don't know if there's a convenient function for it in
RT::Client::REST but I'll be adding it to my rt-client ruby gem shortly.


Mohy Farag wrote:
 How can I get a hash of links from rt?
 
 By links I mean (Depends on, Depended on by, Parents, Children, Refers to 
 and, Referred to by).
 
 This will be a script in perl that runs remotely and connects to an RT 
 machine. my research led me to module RT::Client::REST. It can retrieve 
 other info on a ticket but not the links. any idea how I can get a hash of 
 links from rt?
 
 Currently RT::Client::REST-show() only returns
 
 $VAR1 = {
'TimeEstimated' = '',
'Status' = 'open',
'Queue' = 'q1',
'AdminCc' = '',
'Requestors' = 'l...@log.com',
'Started' = 'Thu Feb 19 1:02:58 2009',
'InitialPriority' = '40',
'Starts' = 'Not set',
'TimeWorked' = '',
'id' = 'ticket/2',
'Told' = 'Not set',
'Cc' = '',
'Subject' = 'test ticket',
'FinalPriority' = '90',
'TimeLeft' = '',
'Creator' = 'guy',
'Owner' = 'guy',
'Resolved' = 'Not set',
'Created' = 'Tue Feb 17 13:22:11 2009',
'Priority' = '42',
'Due' = 'Not set'
 };
 
 
 -Mohy
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to get RT ticket links.

2009-06-01 Thread Tom Lahti
 Mohy Farag wrote:
 How can I get a hash of links from rt?

 Tom wrote:
 URI:  REST/1.0/ticket/nn/links/show

 Give it a try.  I don't know if there's a convenient function for it in
 RT::Client::REST but I'll be adding it to my rt-client ruby gem shortly.

rt-client has been updated, version 0.2.2 now includes a links() method for
this.  Available on rubyforge, or just gem install rt-client.  Docs at
http://rt-client.rubyforge.org/

P.S. I can't believe I top-posted.  What a newb.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Custom Fields and Tickets in RT DB Schema

2009-06-01 Thread Tom Lahti
Christian Gilmore wrote:
 I've been trying to understand how custom fields relate to tickets in the 
 RT3 schema, and I can't make that connection. I see transactions related 
 to the ticket and the setting of custom fields, but it doesn't seem to 
 have the custom field value in the transaction. I need some help making 
 this db-level connection.

My advice: don't.  Use the REST interface.  It's guaranteed* not to change,
even in RT 4.0 where the schema will most assuredly be completely different.

* Based on previous emails on the list from Jesse.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to get RT ticket links.

2009-06-01 Thread Tom Lahti
Mohy Farag wrote:
 
 Thanks for your prompt replies but, I need a solution in perl.
 
 -Mohy

There I cannot help you.  RT::Client::REST seems to be written by Dmitri
Tikhonov dtikho...@yahoo.com, you might try seeing if he's on the RT
developer list, or as a last resort, email him directly.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Custom Fields and Tickets in RT DB Schema

2009-06-01 Thread Tom Lahti
Christian Gilmore wrote:
 Thanks, Tom, for the reply.  Based on your recommendation, I searched for 
 the REST documentation and found http://wiki.bestpractical.com/view/REST. 
 I probably should have mentioned what I want to do. I'd like to be able to 
 get a report on the breakdown of tickets by a particular custom field's 
 values. I don't see an obvious way to do that through the REST interface. 
 I don't see a way through the standard web search interface to do it 
 wholesale, just one-by-one. Any ideas on how best to get these metrics?

If you can do the queries in TicketSQL, then you can do it with REST.

/REST/1.0/search/ticket/?query=TicketSQL_queryformat=s

This will give you a list of tickets, which you can count.

The TicketSQL can be CF.{Fieldname} = 'something' or CF.{Fieldname}  0
and CF.{FieldName}  100, or whatever.


Or, if using my ruby library rt-client:

rt = RT_Client.new
count = rt.list(:query = CF.{Fieldname} = 'something').size

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] is there a place in RT where I can view an HTTP REST request?

2009-05-27 Thread Tom Lahti
Kim Jones wrote:
 Developers, 
 
 Is there a place in RT where I can add logging to
 see what exactly RT is getting when it receives a REST request? Re a
 place where I can print to the log the http reest being received.

It's HTTP.  You can log the HTTP request/response with wireshark fairly
easily.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] TimeWorked not always recorded as separate Transaction - workaround?

2009-05-26 Thread Tom Lahti
Fran Fabrizio wrote:
 Looking at the Transactions table, it seems that I have the TimeWorked 

Why go after the transactions?  The ticket has its own TimeWorked field,
which _should_ be cumulative of TimeWorked entries from transactions.  (It
is set by editing the field directly, added to by adding a transaction
TimeWorked.)

If you need more granularity, then I suspect that you may need to rethink
the work flow process.  Perhaps your tickets should be broken down into
smaller units.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Perl help

2009-05-26 Thread Tom Lahti
 I need to know how to take an email address (directly from an email 
 header) and get the actual UserId/PrincipalId from RT. I have the 
 address split out and now I just need an ID. I'm assuming that the 
 PrincipalId is the same thing as the Name field from the USERS Table. In 
 other words, I do NOT want to add an entire email address as a Ticket 
 watcher, I want the Name field from the USers Table (ie. instead of 
 kfcroc...@lbl.gov I want KFCrocker or whatever name correlates to 
 kfcroc...@lbl.gov). Thank you in advance.

Going into the database schema directly is a bad idea.  Future upgrades can
(and will) change the schema, breaking your customization.  Use the REST
interface instead.  See http://wiki.bestpractical.com/view/REST

Then, an HTTP GET of the URI '/REST/1.0/user/KFCrocker/show' should get you
something like:

id: user/217
Name: KFCrocker
Password: 
EmailAddress: kfcroc...@lbl.gov
RealName: Ken Crocker
Lang: en
Privileged: 1
Disabled: 0


However, here you are querying by name, not by email address, so hopefully
they all match.  If they don't you aren't going to be able to do it reliably
in a future-proof way without doing something you really don't want to do.

Though really, I'm not sure why you'd want to do this in the first place.
RT is quite happy to look up based on email address internally, you don't
have to supply the ID when creating tickets and such, just an email address.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] mis-use of indexes on the Attachments table (RT 3.8.2)

2009-05-26 Thread Tom Lahti
 This is on a new host, and we imported via a mysqldump and re-import, so the
 data in the table should be defragmented... but the end result is clearly
 problematic.

Wait a minute.  Did you install 3.8.2 and load a dump into it from the older
version?  Oy vey.  The schemas don't really line up.

You'd need to install the old version of RT on the new host, and then go
through the upgrade process.  Otherwise you're in for a lot of manual
discovery  cajoling to get things to work properly.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] any ideas why this post with php CURL not setting custom field?

2009-05-22 Thread Tom Lahti
Custom fields should be in the form of:

CF.{CustomField}: value

So you want

CF.{UPC}: 7585485.

-not-

CF-UPC: 786936180992

vtplymblfan...@yahoo.com wrote:
 Could the problem be that I have to encode the dash in CF-UPC somehow 
 before sending it via CURL (but it gets encoded automatically from the 
 form and that is why the form works)?
 
 I hope to be able to add some logging statements to 
 REST/1.0/ticket/default so that I can see what RT is getting in either 
 case, but as yet I don't have the needed permissions from my admin.
 
 K
 
 
 
 *From:* vtplymblfan...@yahoo.com vtplymblfan...@yahoo.com
 *To:* rt-users@lists.bestpractical.com
 *Sent:* Tuesday, May 19, 2009 12:53:21 PM
 *Subject:* [rt-users] any ideas why this post with php CURL not setting 
 custom field?
 
 Hi there,
 
 I have modified a web application to post to RT's web interface a create 
 ticket request. The post works perfectly... the ticket get created in 
 the right queue with the given subject and text... except that the 
 custom field value I pass (UPC) in does not get set. Here is the CURL code:
 
 
 
 $content = 'id: new
 CF-UPC: 786936180992
 Text: This is the ticket text
 Subject: This is the subject
 Queue: External App Requests';
 
 $request = RT_LOCATION;
 $request .= 'ticket/new/';
 
 $postargs = array(
'user' = RT_USER,
'pass' = RT_PASS,
'content' = $content
 );
 
 // get the curl session object
 $session = curl_init($request);
 
 // set the POST options
 curl_setopt ($session, CURLOPT_POST, true);
 curl_setopt ($session, CURLOPT_POSTFIELDS, $postargs);
 curl_setopt($session, CURLOPT_HEADER, true);
 curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
 curl_setopt( $session, CURLOPT_HTTPHEADER, array( 'Expect:' ) );
 
 // do the POST and then close the session
 $response = curl_exec($session);
 curl_close($session);
 
 ---
 
 In debugging this I have also created a simple form which posts to the 
 same place:
 
 form method=POSTaction=http://foo.foo.edu/REST/1.0/ticket/new/;
 User: input type=text name=user size=20br
 Pass: input type=text name=pass size=20br
 Content: textarea rows=10 name=content cols=30id: new
 CF-UPC: 786936180992
 Text: This is the ticket text from the form.
 Subject: This is the subject
 Queue: External App Requests/textareabr
 pinput type=submit value=Submit name=B1
 /form 
 
 When this form is used, again the ticket is created but in this case the 
 custom field UPC does get set. But 
 the Content: being sent is the same in both. In particular in both cases I 
 am providing UPC's value with 
 CF-UPC: 78... Can anyone here explain what the difference could possibly be 
 between these two
 posting methods that could result in this scenario? By the way, in both cases 
 I am passing in the same 
 user name and password. I am really stumped and I suspect some small stupid 
 thing I have missed.
 
 Thanks for your help,
 Kim
 
 
 
 
 
 
 
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT 3.6.5 causes connection aborts resulting in 500 error

2009-05-20 Thread Tom Lahti
Kage wrote:
 Same error is occurring with 1GB of memory on the VM.  Everything else
 in Apache works just fine, but RT is dead until I restart Apache2.

As I said before:

 But I would start by looking for more clues when the system is in the not
 working state.  Look at memory usage, CPU usage, and the like.  See if
 apache is responding to other non-RT page requests.  Doing so will help
 you narrow it down.

In other words, when it breaks next, DON'T just restart apache2.  Log into
the system and poke around _while its broken_.  Try to load a web page
through apache that is not RT-related _while its broken_.  Look at the
memory usage _while its broken_.  Look at CPU load _while its broken_.  Poke
around in all the logs you have in /var/log for recent messages.  See if you
can narrow it down any.

Taking wild stabs and guesses at stuff is a pet peeve of mine; it is not
problem-solving.  Be deterministic rather than guessing and you'll be more
efficient (and learn to be more self-sufficient at the same time).

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT 3.6.5 causes connection aborts resulting in 500 error

2009-05-20 Thread Tom Lahti
Kage wrote:
 Well, to reiterate what I said, I did try other Apache2 pages while it
 was broken.  They load just fine with no errors, including Perl
 scripts.  CPU load is 0%, Load is 0.01 or around there across the
 board.  Memory is about the same as after the VM boots up (about 100MB
 in use).  The logs say exactly the same thing as in my first E-Mail.
 I'm not sure how else to narrow it down.  Nothing else is
 disfunctional in the VM except for RT.  I have also rebuilt this VM
 from scratch about 4 times now trying to see if perhaps that is an
 issue in and of itself, and the error is recurring.
 
 Any other ideas?  I can't seem to narrow it down any more using these methods.

OK, that's excellent.  It means its confined to one of RT or the RT/Apache
interface you are using.  Are you using fastcgi or ?  What version is it?

You could also try upgrading to RT 3.8.2.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT 3.6.5 causes connection aborts resulting in 500 error

2009-05-19 Thread Tom Lahti
Kage wrote:
 Essentially what happens is I can use RT for an extended period of
 time (from 1 hour to 10 hours), and eventually, it'll stop working,
 resulting in a 500 Internal Server Error.

Sounds like resource exhaustion of some kind, perhaps a memory or some other
type of leak in mason, perl, apache, or RT.  I hate to be vague, but it
could be anything.  You probably need to step outside what is in hardy's
repository and start upgrading things, probably starting with perl itself.

But I would start by looking for more clues when the system is in the not
working state.  Look at memory usage, CPU usage, and the like.  See if
apache is responding to other non-RT page requests.  Doing so will help you
narrow it down.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Merging two RT databases

2009-05-15 Thread Tom Lahti
 I would like to use the RT codebase instead of writing a perl script
 that interacts with the MySQL DB directly.  I think the latter approach
 would be less reliable.

If I had to do this, I would use the REST interfaces.  Do a REST request to
one RT to get ticket info, then turn around and use the REST interface on
the other to create a new ticket.

Problem is, you don't specify a ticket number when you create a new ticket.
 RT assigns one.  If you absolutely have to do that, you've no choice but to
dig into the db schema, which will be exponentially more difficult.

But you can always create a special queue just for the merged tickets, or
add a custom field and set its valued to merged from other system or some
such, so that you can tell them apart.

 I should also note that I can take RT offline to do the merge if necessary.

Shouldn't be necessary if you can use the REST interfaces.  Have a look at
http://wiki.bestpractical.com/view/REST.  There are convenience libraries
already written for both perl and ruby (the latter is my work).

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] HTML templates for RT ?

2009-05-11 Thread Tom Lahti
  - why isn't it possible by default to send HTML emails ? Text emails
 in Outlook are not very sexy.

Tech types, which would be a large percentage of RT users, abhor HTML email.
 I do.  I don't care about sexy, I care about information, and HTML-izing
something usually doesn't mean adding useful visual information, it usually
means clutter.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to modify the ticket # format?

2009-05-11 Thread Tom Lahti
Ruslan Zakirov wrote:
 http://wiki.bestpractical.com/view/SetStartingId + cronjob to set it
 everyday, however you must understand limits on integers in your DB.

 Example: #200905110001  would be the 1st ticket for today.

A normal signed int in 32-bit mysql has a maximum value of 2147483647, which
isn't big enough for the format requested.  You'd need to alter the table
structures to change ticket id's to a bigint.  How much code that would
break inside of RT, I have no idea.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to modify the ticket # format?

2009-05-11 Thread Tom Lahti
Ken Crocker wrote:
 Tom,
 
Why do you need a date prefixed to the Ticket ID? In my 40 years in

I don't, the OP (Eric) does.  Couldn't agree with you more on your point.
There's already a created date field for each ticket.  To add that again
as part of the ticket ID will definitely be counterproductive.  If the
proposed cron job doesn't fire for some reason, you'll have a mess: ticket
ID's with this embedded 'create date' will lie.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Autogenerating a password for requestors

2009-05-07 Thread Tom Lahti
 # CHANGED NEXT 3 LINES TO TEST REQUESTOR INSTEAD OF CREATOR
 # SO THAT WILL EMAIL REQUESTOR A PASSWORD WHEN STAFF CREATES
 # THE TICKET IN WEB INTERFACE
 
 Worked like a charm, thanks a lot!

Yikes!  If I called someone and made a request via the phone and they
emailed a password for some system I'd never heard of, I'd probably flag it
as spam.  I sure as heck wouldn't log into it, because (a) I don't know if
it really came from them, (b) I don't know what this system does -- XSS
attack, anyone?  (c) the password was just emailed across the net in clear
text.  Oi vay.

On the other hand, if I made the request via email, I might totally expect
to get a autoreply via email, but I'd still want my new password encrypted.

Perhaps RT can discover attached GPG/PGP keys and add them to a user's
record at autocreate?  Now that would be awesome.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] how to run new rt cli in cron

2009-05-04 Thread Tom Lahti
 How do I by pass the password prompt? Is there another user I can use 
 instead where I don't have to feed a password thru cronjob?

You do not need an expect script or to feed the password to the CLI's 
STDIN at all.  All you need is to arrange for the environment variables 
RTUSER, RTSERVER and RTPASSWD to be set in your environment before 
calling the CLI, like so:

#!/bin/sh

export RTUSER=someone
export RTPASSWD=Something
export RTSERVER=https://rt.server.com/

/opt/rt3/bin/rt show ticket/123

--

If you are parsing the output of the CLI, you're better off using the 
REST interface instead.  The CLI's output changes from version to 
version, which will throw off your parse.  The REST output won't change.

See http://wiki.bestpractical.com/view/REST

--
Tom Lahti



___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Query for Service downtime

2009-05-04 Thread Tom Lahti
 services. I had a plan of fetching the difference in time of when the 
 tickets were opened and when the tickets were resolved. That would give 
 me the downtime but I have no idea how to implement that. Any help on 
 this regard will greatly appreciated.

That's not really downtime, I wouldn't think, unless the tickets are 
both opened and resolved automatically.  Are they?

If either is done by a human, then its not system downtime.  It's time 
to whenever-the-human-felt-like-doing-RT-stuff.

--
Tom Lahti
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] disable auto-creation of users by rt-mailgate

2009-04-30 Thread Tom Lahti
Here's one I thought would be real simple, but I can't find it anywhere in
my copy of _RT Essentials_ or in the wiki.

We got our first spam into a queue today, and everybody completely freaked
out and tagged it a security issue.  Argh, the ignorance of it all.

Anyway, I would like to disable creation of new accounts by rt-mailgate.  If
an email comes in and they're not already an RT user, just drop the email on
the floor.  Simple setting, or complex customization?

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Query for Service Downtime

2009-04-29 Thread Tom Lahti
 I was just wondering if I can generate a report for system downtime
 (i.e. the service names and its corresponding downtime) through
 query builder. Plan was to give the customer name as input and generate
 the graph as well as chart where the instance name, service name and the
 downtime is shown. Any help in this regard is greatly appreciated. 

 xymon (formerly hobbit monitor) makes great availability reports.  Not 
 sure how this is a RT question... ?

 Thanks Tom, but can I integrate the same with my existing RT (3.8.2)
 environment and how can I do that? Where can I get the official
 documentation for the Xymon.

 Regards,
 Uday

RT doesn't monitor anything, so it doesn't really have the necessary data to
create availability reports.  Xymon's web site is
http://hobbitmon.sourceforge.net/  (it still says hobbit monitor all over
it, but they've changed the name due to legal issues).

As far as integration, it would be quite simple to have xymon fire an alert
to the email address for a queue, thereby automatically creating a ticket
during an alarm event, something I plan on doing here.  But the availability
report would still only be available through xymon, not through RT.  That is
not RT's purpose.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] URL-based queries?

2009-04-28 Thread Tom Lahti
 Just wondering if it's possible to do URL-based queries into the RT 
 tickets database.
 e.g. http://rt.website.com/rt/search?Queue=GeneralStatus=Resolved
 etc.

You might want to look at http://wiki.bestpratical.com/view/REST

depending on why you are asking...


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Query for Service Downtime

2009-04-28 Thread Tom Lahti
   I was just wondering if I can generate a report for system
 downtime (i.e. the service names and its corresponding downtime) through
 query builder. Plan was to give the customer name as input and generate
 the graph as well as chart where the instance name, service name and the
 downtime is shown. Any help in this regard is greatly appreciated.

xymon (formerly hobbit monitor) makes great availability reports.  Not sure
how this is a RT question... ?


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] advice for mobile techs

2009-04-28 Thread Tom Lahti
 gets sent out and replied to, it gets added as correspondence (i.e.
 the Requestor sees it) not comments.  Since we don't have a
 dispatcher, there's bound to be alot of ticket chatter while we figure

You need another alias for comments, that uses --action comment instead of
--action correspond as an option to rt-mailgate.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Upgrade RT

2009-04-28 Thread Tom Lahti
 Ok now that upgrade completed on the test system, I now see 5000 more
 tickets already
 created on the production systems. Do I have to redo this whole thing? I
 have binlog enabled
 since the beginning of the original instance. How do I append those new 500
 tickets?
 I guess I am now on a catchup game :-)

You're gonna have to shut down the production instance during the
conversion.  No way around it.  Stay late and bring pizza and beer ;)


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] rt-client usage?

2009-04-28 Thread Tom Lahti
rubyforge's statistics don't account for installations done via gem, so I'm
wondering if anyone has actually installed the ruby rt-client library and is
using it?  If so, any feedback?  Praise? Complaints? Patches?

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Ruby - REST, part 2

2009-04-23 Thread Tom Lahti
 Content-Disposition: form-data; name=content
 
 Ticket: 5702
 Action: comment
 Text: Adding attachment(s).
 Attachment: attachment.txt


Your form is wrong.

This is a different issue than what I had, but the results of that 
exercise are a ruby library which has been open-sourced.  You can make 
your life a lot easier by installing and using rt-client from rubyforge. 
  gem install rt-client should do the trick, and then:

rt= RT_Client.new( :server  = https://your.rt-server.com/;,
:user= rt_user,
:pass= rt_pass )
rt.comment( :id   = 5702,
 :Text = Adding attachment(s).,
 :Attachment = attachment.txt )

and the library will take care of all the gory details for you.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] sessions table is lost after a system crash

2009-04-23 Thread Tom Lahti
Kenneth Marshall wrote:
 Tim,
 
 I am curious. Are you using InnoDB tables or MyISAM tables?
 I thought that RT needed InnoDB. Does it have a problem with
 system crashes and recovery with InnoDB?
 
 Just wondering.
 Ken

I was just about to say the same thing when this came in.  I think you want
InnoDB tables, not MyISAM.  In particular, large tables like the attachment
table will have problems, and frequently updated tables like the session
table will have crash recovery issues.  The crash recovery in the InnoDB
backend is more robust, as is the indexing methodology.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Formatted text in RTFM articles

2009-04-22 Thread Tom Lahti
 Try defining the CF asFill in WikiText. That works better.

 I've tried that and the result is exactly the same :-(. Any other idea?

When using the wikitext area in RTFM, any text that does not begin in the
first column is rendered as preformatted text.   So instead of:

Texttexttextmoretextmoretextmoretext

use:

 Texttexttextmoretextmoretextmoretext
^

Note the space in front of the line, meaning it does not begin the first
column and so is treated as pre-formatted.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] search display question

2009-04-21 Thread Tom Lahti
presc...@wcoil.com wrote:
 I figured out how to just give a url to Results.html and it seems to 
 work fine.

... until some future version of RT where the URI scheme of the web 
interface changes.  The REST interface won't.

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Does Anyone out there use RT for Change Management?

2009-04-21 Thread Tom Lahti
Steve OBrien wrote:
 Hi All,
 I was wondering if anyone out there was using RT for IT Change
 Management and if so:
 1.) How is it working out for you?
 2.) Any helpful hints or a description of your setup.
 
 If not, is there any other tracking system that would work better for
 tracking, approving, and notifying changes (server configurations, etc)

Yea, we use it for that.  Among lots of others things, the IT queue is only
one of many in our RT setup.  Works great.

Helpful hints is rather vague, and I can't think of anything specific to
IT change management in that area.  Our platform is Linux and mysql for the
backend, with postfix and cyrus imap doing email duties.  I'm not sure the
setup of our RT would be very helpful, since every company is quite
different and requires radically different RT configs.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT thinks that the ticket has no recipients....

2009-04-21 Thread Tom Lahti
 [Tue Apr 21 20:47:30 2009] [info]:
 rt-3.8.1-25329-1240346849-319.5-...@minervan
 etworks.com #5/96 - Scrip 5 On Correspond Notify AdminCcs (/usr/lib/
 perl5/vendo
 r_perl/5.8.8/RT/Action/SendEmail.pm:302)
[snip]

[info] means its informational.  If was an error it would say [error].  So,
those log entries don't really tell you anything other than what you already
know. The problem is likely your config and/or usage.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT thinks that the ticket has no recipients....

2009-04-21 Thread Tom Lahti
 In the People tab:
 Owner:Gary Greene ggre...@minervanetworks.com (ggreene)
 Requestors:   Gary Greene ggre...@minervanetworks.com (ggreene)
 Cc:   
 AdminCc:

And what are you expecting to get?  An email to the owner? An email to the
requestor?  Both?

Do you have scrips configured in this queue (or global ones) that cover
those recipients for the event you want to trigger the email?

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT thinks that the ticket has no recipients....

2009-04-21 Thread Tom Lahti
 Do you have scrips configured in this queue (or global ones) 
 that cover
 those recipients for the event you want to trigger the email?
 
 I should, since I've got the normal global scrips set for comments and 
 replies.

I should tells me you haven't looked at the scrips for the queue (and I
have no idea what the normal global scrips would be, been quite a while
since I had a default installation).

Configuration - Queues - queue name - Scrips

Pay attention to the _condition_.  On create is a different condition than
on comment and on correspond.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT thinks that the ticket has no recipients....

2009-04-21 Thread Tom Lahti
 Where in the settings? I don't see a setting for it in the web UI. Is
 this another option that needs set in RT_SiteConfig.pm?

Yes, its in the config, not the UI.

By default, RT doesn't notify the person who performs an update, as they
already know what they've done. If you'd like to change this behavior,
Set $NotifyActor to 1.

Set($NotifyActor, 1);

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Disable Auto-Reply on Ticket Resolution for A specific Queue

2009-04-17 Thread Tom Lahti
 1. Ticket is created in Queue #1
 2. Ticket is moved to Queue #2 and resolved
 
 Tickets resolved in Queue #1 must still generate autoreplies upon
 resolution, but Tickets resolved in Queue #2 must not.

I think you're better off creating a new ticket for Queue #2 that is
depended on by the ticket in Queue #1, where the requestor of the ticket in
Queue #2 is the owner of the ticket in Queue #1, but that's just me.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Manager permissions

2009-04-17 Thread Tom Lahti
 One of our managers wants to get notified of all tickets and be able
 to view all tickets logged by her staff against other teams so that
 she can chase up the other teams when her staff are away.

Baby-sitting, aka micro-managing.  You gotta love people like that :)

It would be nice to be able to do a saved search for Creator in group,
wouldn't it?

You could re-purpose a field a little bit that is searchable.  Say you set
the Organization field in the user records for her group to something
unique, like Company name-Dept, then you can make a saved search on
Requestor Organization is 'Company name-Dept' and put that on her
portal page.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Create Groups Queues Programatically

2009-04-17 Thread Tom Lahti

 [Fri Apr 17 15:59:11 2009] [crit]: Someone called RT::Group-Create. this
 method does not exist. someone's being evil
 (/opt/rt/lib/RT/Group_Overlay.pm:387)

Read the perldoc for Group_Overlay.pm.  What you need to do is described
therein.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Ticket History Display

2009-04-16 Thread Tom Lahti
 1.) Email submissions are double spaced.  This takes up a lot of room
 when viewing the ticket history.

They aren't in my RT.  Without knowing what's causing it in your
installation, there's no way to know how to fix it.

You could make a local Display.html that unwraps the text and then rewraps
it, or figure out why its getting double-spaced in the first place and
eliminate the cause.

 2.) Top posting - can the most recent actions be on top so you don't
 have to scroll all the way down to see the most recent action?

Yes, that's in the Preferences in RT, per user.  It would seem there is a
way to change the global default, it might be:

set($OldestTransactionsFirst,1);

 3.) Stripping out the signatures from emails.  Is it possible?

Two options: hack rt-mailgate to strip them before inserting into the
database, or make a local Display.html  History.html to display it without
the signatures.  The latter is probably safer in that if your parsing is
wrong, you still have the original data.

I've actually been considering which option to take with removing quoted
text from emails, not just signatures.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Set status to open when ticket is taken

2009-04-16 Thread Tom Lahti
Steve OBrien wrote:
 Another suggestion from my pilot group is that they would like tickets
 to automatically change status from new to open when taken.  Any help
 accomplishing that would be appreciated.

It's not really open until someone actually works on it, is it?  Seems like
a semantic issue to me.  New means its recorded and waiting for
activity, open means its being worked on.  If its just assigned and no
activity, its not being worked on.  Seems a bit deceptive to preemptively
set it to open without actually working on it.

Anyway, philosophy aside, you could do this with a scrip.  Make it
condition: On owner change, Action: user definded, Template: blank.

Custom action prep code:
return 1;

Custom action cleanup code:
$self-TicketObj-_Set(Field = 'Status', Value = 'open', RecordTransaction
= 0);
return 1;

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Ticket History Display

2009-04-16 Thread Tom Lahti
 3.) Stripping out the signatures from emails.  Is it possible?
 Two options: hack rt-mailgate to strip them before inserting into the
 database, or make a local Display.html  History.html to display it without
 the signatures.  The latter is probably safer in that if your parsing is
 wrong, you still have the original data.

After looking at this some more, really all you need is a local copy of
Ticket/Elements/ShowMessageStanza, with customizations added therein to
parse the signature and/or quoted text.

It should be possible the plop them in a div that is initially hidden and
offer a control to unhide it, for viewing the original pieces as well
(someone else's idea from an earlier thread when it was quoted text and not
signatures).

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] passing values on ticket create

2009-04-13 Thread Tom Lahti
presc...@wcoil.com wrote:
 I would like to know if there is a way to pass a custom field value on 
 ticket create.
 We have a internal billing system and one of the buttons is for a new 
 ticket.
 I want to pass the customers account number as a custom field value to the 
 create screen in RT.
 What is the best way to accomplish this...

Use the REST interface rather than POSTing to the web interface.  That's
what its for (and you can easily set custom fields that way).

The web interface may change with an upgrade, breaking your code; the REST
interface will not.

See http://wiki.bestpractical.com/view/REST

There are REST client convenience libraries for perl (RT::Client::REST on
CPAN) and ruby (rt-client gem on rubyforge), or you can roll your own
directly to the REST interface fairly easily.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] How to use smtp on other server

2009-04-08 Thread Tom Lahti
nast linux wrote:
 Dear All,
 
 I already had smtp server (lotus notes on windows server 2003), I want to
 use the smtp for RT server.
 I will not install smtp service on RT server.

In RT_SiteConfig.pm:

Set($MailCommand, 'smtp');
Set($SMTPServer, 'notes server name');

 http://wiki.bestpractical.com/view/InstallMailgateOnly that should be
 installed mailgateonly, is that right?
 Is it possible to install mailgateonly on windows system, where I can
 download mailgateonly for windows system?

Mailgate is for incoming mail to RT, not outgoing mail from RT.  You can
install it on your Windows system so long as the Windows system has perl
installed with all the required modules for rt-mailgate, and your Notes
server can pipe email contents to a command.

Installation steps would be something like:

1. Install perl on Windows machine.
1a. Install perl modules Getopt::Long, LWP::UserAgent,
HTTP::Request::Common, Pod::Usage, HTML::TreeBuilder, HTML::FormatText.
2. copy rt-mailgate from /opt/rt3/bin to your Windows server.
3. Configure Notes to take email sent to a queue address and pipe the email
contents into the command 'rt-mailgate --queue queue_name --action
correspond --url http://rt_server/', ensuring the command environment is
sufficient for perl to find its modules.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Encoding problem after upgrade

2009-04-08 Thread Tom Lahti
 interface seems slow) - Ah hah. When you followed the upgrade 
 instructions, you probably ran upgrade-mysql-schema.pl, which doesn't 
 actually upgrade the mysql schema. It generates SQL queries to do so. 
 You have to capture those queries to a file, and then run that file to 
 actually upgrade the schema.

In my humble opinion, the name of upgrade-mysql-schema.pl is a bit
deceptive.  We keep running into this over and over again.  I think the
script should be renamed to create-mysql-schema-upgrade-queries.pl or some
such.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Random logouts in RT 3.8.2

2009-04-08 Thread Tom Lahti
 Now we try to get our old database from 3.6.1 into the new instance of RT.
 The dump imports into mysql 5.0.26 and the update-script works without 
 error-messages.

Once again: when you ran upgrade-mysql-schema.pl, it did not actually
upgrade the mysql schema.  That script generates queries that you must
capture to a file, and then run THAT file to actually upgrade the schema.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Adding a custom field to ticket resolution? rt 3.8.1

2009-04-08 Thread Tom Lahti
 I'd like to assign ticket resolutions to a category, like documentation 
 error, incorrect customer use, software fix, etc.  Is there a way to add a 
 Select one value custom field to the resolve ticket screen?

Custom fields that apply to ticket transactions are available on the resolve
screen.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Modifying SimpleSearch in RT 3.8.2

2009-04-07 Thread Tom Lahti
 ( status = 'new'
  OR status = 'open'
  OR status = 'stalled'... etc
 
 into the query (which are the active statuses listed in the
 @ActiveStatus array in RT_SiteConfig.pm).  We simply want to remove this
 portion from the default search criteria.

I think this is done in $RTHOME/lib/RT/Search/Googleish.pm

You'd need to copy it to $RTHOME/local/lib/RT/Search/Googleish.pm and modify
its code.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT3 tuning - web interface seems slow

2009-04-07 Thread Tom Lahti
 I believe all install and upgrade recipes were followed properly. Though 
 we currently have a (presumably) unrelated problem with image attachments 
 getting corrupted (change to UTF-8 ??).

Ah hah. When you followed the upgrade instructions, you probably ran
upgrade-mysql-schema.pl, which doesn't actually upgrade the mysql schema.
It generates SQL queries to do so.  You have to capture those queries to a
file, and then run that file to actually upgrade the schema.

After that, your image attachments should then be fine.  Might also solve
your performance issue.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT-Mailgate hack to remove quoted replies

2009-04-06 Thread Tom Lahti
Gary Greene wrote:
 There are a number of interesting mods that I've noted he's working on
 that I'm interested in. (For instance the scrip changes to enforce only
 requesters can change the ticket's status, etc.

Actually, I accomplished that with just scrips.  And then I convinced
ownership it was a bad idea, because it meant that people working on tickets
could no longer use their ticket list as a to-do list, and it wasn't
really needed because a requestor can always re-open a resolved ticket by
just replying to the email.

They were actually trying to solve another issue where a requestor was not
notified when a ticket was resolved.  That's what happens when owners try to
play systems analyst without telling the engineers what the actual problem
is and just try to ask for what they think the best solution would be instead.

However, if you're dying for it all you have to do it apply a scrip to
condition On Resolve with action prep:

return 1;

and action cleanup:

return 1 if $self-TransactionObj-IsInbound;
$self-TicketObj-_Set(Field = 'Status', Value = 'open', RecordTransaction
= 0);
return 1;

And then, when someone other than a requestor resolves a ticket, the cleanup
code sets it back to open. The IsInbound method of the Transaction object
returns true if the transaction was generated by a requestor.

Then you just do the same thing in reverse for conditions that generate
'resolved' emails so you aren't sending out an email when a non-requestor
tries to resolve.  I tried playing around with template code to send
different emails whether it was a requestor or not (Dear requestor, XXX
would like you to resolve ticket YYY), but Text::Template parsing is rather
limited and it never worked the way I wanted it to.  Notably, you can't have
a conditional (like an 'if' statement) span blocks.


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] List tickets I ever transacted on?

2009-04-06 Thread Tom Lahti
Paul Hirose wrote:
 Trying to find a Query Builder or other method to list all current
 (not-Resolved/Rejected/Deleted) tickets that I may have been a part of.
 Some tickets are owned by another staff member, but I've transacted on
 (either as a Comment or Reply.)

Pretty sure you can't do this in RT itself, you'll have to query the
database directly.

First find out your numeric user id with something like select id,name from
Users where name like '%paul%'.  Let's say your ID is 42.

Then you can do select distinct ObjectID from Transactions where
Creator='42' and ObjectType='RT::Ticket' order by ObjectID

Voila, list of ticket numbers you've transacted on.
-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Scrip with multiple custom fields checked.

2009-04-06 Thread Tom Lahti
[snip]
 I only
 want to call the action once regardless of how many custom fields change
 (i.e. if 1+ custom fields change, execute action once).
 
 Template Stage: Transaction Create 

I think you want the scrip to execute in TransactionBatch stage instead of
TransactionCreate.  It does exactly what you want.  You have to enable it in
your site config first.

-- 
   Tom Lahti
   BIT Statement LLC

   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] RT-Mailgate hack to remove quoted replies

2009-04-03 Thread Tom Lahti
I am having an awful time with getting users to remove quoted text from
replies.  I've begun looking at rt-mailgate code to figure a way to remove
the  Original Message  and below it that Outlook creates when you
hit reply.

the write_down_message() function seems to either create a temp file or use
memory to take the message from STDIN.  I thought about stripping it down
during reading from STDIN but its being read in binmode 8k at a time, so the
 Original Message  might be broken across chunks.  So that won't work.

After write_down_message(), I could simply regex it into oblivion -- if its
in memory.  If its in the temp file... it doesn't seem like a scalable
solution to read the temp file and re-write it.  We've already written the
message to the temp file once.

What I'd like to do is go back to write_down_message() and look for the key
line, and do some sneaky read-ahead of a few bytes into the next buffer if
the end of the buffer _could_ be a broken Original Message line, and then
seek back to the beginning of that chunk if it isn't.

Finally,  I suspect that Outlook puts attachments after the body, in which
case an email reply that contains attachments would get the attachments
dropped unless I keep reading for a MIME boundary, in which case I have to
know what the boundary is in the first place, which means parsing the header.

Has anyone else done anything like this already, or am I venturing into
uncharted waters here?  Does my plan sound decent, or am I crazy for even
thinking of it?

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] What software is recommended for high-loaded RT3.8-latest?

2009-04-02 Thread Tom Lahti
 I have no enough experience with Slackware. AFAIK, it's simple as BSD. Is it 
 true?

I second the Slackware vote.  I use it for everything.  It's the ultimate
distro for reliability-through-simplicity.  Install nothing you don't need.
 If you don't need xxgdb on your production server, don't install it.  (I
don't even have X installed on my servers, but that's just me).
Incidentally I frequently have servers go 200 days + without so much as a
reboot, even high volume FTP servers like this one:

r...@:~# uptime
 13:13:47 up 246 days,  1:53,  2 users,  load average: 0.23, 0.14, 0.05

 AFAIK, they're all provide good data safety. Now we're using MySQL  InnoDB, 
 I 
 think XFS should be fast enough. But we may migrate to PostgreSQL. AFAIK it 
 uses 
 a number of files (I may be wrong) to serve its DB. So, there can be 
 Reiser/JFS.

Filesystems are something I've spent a LOT of time on, so I know something
about this.

XFS has not-so-good safety.  The fsck / repair tools don't work on very
large filesystems because they need massive amount of memory -- more often
than not, more than you have.  If you need to fsck XFS, odds are you'll be
formatting it instead.  That said, it is deliciously fast and scalable when
properly optioned.  Use a RAID controller with battery backup and you should
be fine; otherwise turn off write-back caching.  Or, test your backups
frequently for restorability. :)

reiserfs is similiar to XFS with safety.  A fsck almost never works because
everything's a tree -- once the tree is scrambled, everything in the tree
below that point is scrambled too.  This is even a bigger risk if you don't
make the filesystem with notail.  You'll be formatting, not fsck'ing.  It
also doesn't scale well and its performance with large files is horrid.

JFS on the other hand, has wonderful repair tools and decent scalability.
Unfortunately, the performance of JFS degrades exponentially with the number
of inodes used (files  directories) as it searches everything rather
linearly, and the inode structure is necessarily inefficient to make it
easily repairable.  Not recommended for a filesystem with gobs and gobs of
small files.  (Unfortunately, I have two 12TB RAID arrays formatted JFS with
over 14 million small files on them, and if they weren't in production, I'd
change it in a heart-beat).

ext4 is no longer in development mode and is considered production quality
(in kernel 2.6.28 and newer).  I highly recommend using it over the other
options.  It is extent-based rather than block-mapped (if you format it as
such), it has the reliability of ext3 and then some (as the journal is
checksummed), and its even faster with lots of small files than reiser if
you create the filesystem with the dir_index option (which creates a hash of
directory entries that is even faster than reiser's b-tree).  It even fsck's
faster than ext3 because it skips unallocated space.

In short: XFS is fast and not reliable.  JFS is very reliable, but slow.
Reiserfs is a pitiful joke (which can used successfully by the daring 
lucky).  ext4 gives you everything you always asked for: the speed of XFS
(ok, almost), the fast lookups of reiser, and the reliability of JFS :)

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] restrict setting status to resolved

2009-04-02 Thread Tom Lahti
Despite all my work with the REST interface, I know little to nothing about
scrips.  I've been asked to restrict setting ticket status to 'resolved'
unless the actor is a requestor.

I tried setting up a scrip with condition On resolve, Action User defined,
Stage Transaction Create:

  return 1 if $self-TransactionObj-IsInbound;
  $TicketObj-_Set(Field = 'Status', Value = 'open', RecordTransaction = 0);
  return 0;

and also:

  return 1 if $self-TransactionObj-IsInbound;
  $TicketObj-_Set(Field = 'Status', Value = 'open', RecordTransaction = 0);
  return 1;


and tried this in both custom action prep code and custom action cleanup
code, as I'm not terribly clear on where it belongs.  (I probably also want
the Value to be the 'old value', but I'm not sure how to access that).

However, nothing seems to have any effect on a user being able to set a
ticket status to resolved when they are not a requestor.  Any scrip fu
guru's out there willing to beat me with a clue bat?

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] restrict setting status to resolved

2009-04-02 Thread Tom Lahti
Argh, as usual the answer hits me right as I hit 'send'.

   $TicketObj-_Set(Field = 'Status', Value = 'open', RecordTransaction = 
 0);

should be

$self-TicketObj-blah blah

Now, how to get at the old value instead of hard-coding open.


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Database help

2009-04-01 Thread Tom Lahti
 This is probably a silly question but I just wonder if anyone is aware at
 the database level how I would locate a reminder and it's due date? I have
 looked about and can't see it for the life of me.

Better yet... is there an (as yet undocumented) REST URI for
reading/setting/deleting reminders?


-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] help with scrip from wiki

2009-03-30 Thread Tom Lahti
I don't see anything wrong with this, but I haven't done much scrip
programming.  I took the scrip from

http://wiki.bestpractical.com/view/AddTicketHistoryToMail

and made a template with it, pretty much verbatim.  Only problem is, when
the email is sent the Complete Ticket History section is empty.

Is this scrip on the wiki up to date for RT 3.8.2?

Is there a way I can take a scrip like this and put it into a perl script to
debug it from a shell?  I can't quite see how...

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] help with scrip from wiki

2009-03-30 Thread Tom Lahti
 I don't see anything wrong with this, but I haven't done much scrip
 programming.  I took the scrip from
 
 http://wiki.bestpractical.com/view/AddTicketHistoryToMail

I think I've solved my own problem.  There's a regex in the script that
skips transactions where the content type is text/html ... and they all are
(since using the rich text editor).  So I added that content type to the
regex and another regex on the $content variable to strip HTML tags.

 Is there a way I can take a scrip like this and put it into a perl script to
 debug it from a shell?  I can't quite see how...

This would still be nice to know how to do, if possible.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Custom field - check boxes, radio buttons and text boxes

2009-03-27 Thread Tom Lahti
 Using check boxes and radio buttons will be easier for our users to
 manipulate. Has anyone done this or do you have any suggestions?

You can certainly do this with RT using custom fields, but not multiple
screen where the state transfers from one page to the next.  It would all
be one screen.

If you wanted multiple screens, you could still do it with a custom web
front end that uses RT's REST interface to store all the data from all pages
to one ticket.

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] ruby library initial release

2009-03-27 Thread Tom Lahti
I have a rubyforge project pending for this, so sometime in the next few
days you'll be able to just do gem install rt-client and get it from
rubyforge directly.

Until then, a ruby gem is attached containing the library, the XML-RPC
service, and all the documentation.  Patches to me, please :)

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 


rt-client-0.2.gem
Description: Binary data
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

[rt-users] forgot -- public copy of documentation

2009-03-27 Thread Tom Lahti
If you want to preview the ruby client API without installing the gem, you
can do so at https://elise.bitstatement.net/doc/rt-client/

-- 
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


  1   2   >