[rt-users] RT::Extension::Nagios and set TimeWorked Total of All Merged Tickets
Hello all, I'm using the RT::Extension::Nagios plugin and would like for statistics purposes for my IT director to have the total time worked calculated from all the previously created problem merged tickets when the recovery ticket is resolved. What I can see so far: a ticket is created from 'PROBLEM' mail subject and successive 'PROBLEM' tickets merge previous tickets into them until we receive a 'RECOVERY' ticket and that last (new) ticket ID is resolved. What I think I need is to get the ticket history of the resolved ticket ID and get the oldest transaction ID from that and get the date created then calculate the difference between the two dates using Date::Calc? To demonstrate I have at least tried (but time is limited by management) hence this mail. I see one can use the rt shell or RT::Client::REST to get the required history. rgabr...@orpheus:~/tmp$ rt show ticket/3/history # 24/24 (/total) 151090: Ticket created by robe...@anomaly.hugetelecom.co.za 151091: Outgoing email recorded by RT_System 151096: Ticket created by robe...@anomaly.hugetelecom.co.za 151097: Outgoing email recorded by RT_System 151098: Merged into ticket #3 by RT_System rgabr...@orpheus:~/tmp$ rt show ticket/3/history/id/151124 # 24/24 (id/151124/total) id: 151124 Ticket: 3 TimeTaken: 0 Type: Status Field: Status OldValue: new NewValue: resolved Data: Description: Status changed from 'new' to 'resolved' by RT_System Content: This transaction appears to have no content Creator: RT_System Created: 2010-02-24 07:46:43 Attachments: I suppose one could set TimeWorked from this. I've tried using SetTimeWorkedAutomatically as a queue scrip but now I see it is no good. I'm learning how RT does things and it's not as expected. I would like to know what is the most logical way of going about this? I've tried looking at /opt/rt3/share/html/Ticket/Elements/ShowHistory and adding some of that to /opt/rt3/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm but I'm digging the hole deeper. I'm not going to investigate the Perl internals of RT quite right now. I could hack a dirty solution together using shell scripts etc. but I want something clean and elegant. Thanks. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Very slow ticket search creation/edit screen 3.8.4
This is the query that takes all the time: # Query_time: 37.415600 Lock_time: 0.000329 Rows_sent: 0 Rows_examined: 4474859 use rt_contdel; SET timestamp=1267024665; SELECT DISTINCT main.* FROM Users main CROSS JOIN ACL ACL_4 JOIN Principals Principals_1 ON ( Principals_1.id = main.id ) JOIN CachedGroupMembers CachedGroupMembers_2 ON ( CachedGroupMembers_2.MemberId = Principals_1.id ) JOIN Groups Groups_3 ON ( Groups_3.id = CachedGroupMembers_2.GroupId ) WHERE (Principals_1.Disabled = '0') AND (ACL_4.PrincipalType = Groups_3.Type) AND (Principals_1.id != '1') AND (Principals_1.PrincipalType = 'User') AND (ACL_4.RightName = 'OwnTicket' OR ACL_4.RightName = 'SuperUser') AND (Groups_3.Domain = 'RT::Queue-Role') AND ((ACL_4.ObjectType = 'RT::Queue') OR (ACL_4.ObjectType = 'RT::System')) ORDER BY main.Name ASC; - Justin Hayes Orbis Support Manager justin.ha...@orbisuk.com On 15 Feb 2010, at 17:42, Justin Hayes wrote: Ah ok, so even if all my users have OwnTicket for a queue getting that list is still faster than showing all users on the Search screen, even though the resulting list is the same length? Total rows in Users is 543. Justin - Justin Hayes Orbis Support Manager justin.ha...@orbisuk.com On 15 Feb 2010, at 17:33, Emmanuel Lacour wrote: On Mon, Feb 15, 2010 at 05:18:53PM +, Justin Hayes wrote: That doesn't seem to be an answer. So it's just slow if you want to have a lot of owners?? It doesn't take 40 secs to render the owner dropdown on ticket create/update, so why should the search screen be so bad? They both use the same element. bevause on a ticket, we already ha ve a queue selected and so we filter potential owners for this queue. in search screen, we load all people that may own ticket in any queue (all users that have OwnTicket right). this is a known issue, but that shouldn't be a problem on most systems where people with OwnTicket rights are a few hundreds. tell us more about how many people you have has potential owner in search screen. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 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 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 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 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Move tickets to Queue
I've solved this by using procmail instead of /etc/aliases. It might not be the most elegant solution but it works for me: :0 * ^(F|f)rom.*gmail\.com | /opt/rt3/bin/rt-mailgate --queue 'Gmail' --action correspond --url http://domain.tld :0 * | /opt/rt3/bin/rt-mailgate --queue 'General' --action correspond --url http://domain.tld On Tue, Feb 23, 2010 at 3:38 PM, JJussi rt-us...@jjussi.com wrote: How about your own version of 'rt-mailgate'. Take existing rt-mailgate and add little bit code in it what selects right queue base on sender address. Then you just need that one /etc/aliases line: support:|my-rt-mailgate --action comment --url http://domain.com/; This is not what you have asked, but better choose right queue outside RT than inside. On Tuesday, 23. Februaryta 2010 15:16:42 polloxx wrote: Thanks for all your suggestions. How can I do this using Scrips, so without the need to go to /etc/aliases? @Kevin: How do I check the return value of Setqueue? @Jerrad: We only have a limited number of customers and needed queues. On Tue, Feb 23, 2010 at 3:31 AM, Jerrad Pierce jpie...@cambridgeenergyalliance.org wrote: On Mon, Feb 22, 2010 at 16:30, Jerrad Pierce jpie...@cambridgeenergyalliance.org wrote: As I'm new to RT I'm trying to setup a system for our needs. We want a queue for each customer. Tickets are created by email. However, if you really want to do this, and assuming you have a relatively fixed set of requestors/queues, the easiest way to handle this would be running rt-mailgate with --extension=queue; of course, your current method of scrips permits you to programatically create a morasse of queues. -- Cambridge Energy Alliance: Save money. Save the planet. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com -- JJussi ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 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 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Scrip to create multiple child tickets
Hi everyone, I have a Select Multiple custom field called 'Client'. I want my scrip to create a child ticket for each client selected. So far, my scrip works, but only creates 1 child ticket, no matter how many clients are selected. Here is my current scrip: RT 3.6.5 Description: Create multiple child tix Condition: User Defined Action: Create Tickets Template: Custom Template: Create multiple child tickets Stage: Transaction Create Custom condition: if ($self-TransactionObj-Type ne 'Create' $self-TicketObj-FirstCustomFieldValue('Client') eq 'client1) { return 1; } if ($self-TransactionObj-Type ne 'Create' $self-TicketObj-FirstCustomFieldValue('Client') eq 'client2') { return 1; } return 0; Here is the Template code: ===Create-Ticket: client Subject: {$Tickets{'TOP'}-Subject} ({$Tickets{'TOP'}-FirstCustomFieldValue('Client')}) Depended-On-By: {$Tickets{'TOP'}-Id()} Owner: testuser Queue: Client Issues Content: This ticket has been auto-created. ENDOFCONTENT Is there anyone that can help me identify why only 1 child ticket is being created, and not multiple? I obviously have limited skills here, so any help would be greatly appreciated! Please please help! Thanks so much! Jonathan -- View this message in context: http://old.nabble.com/Scrip-to-create-multiple-child-tickets-tp27714242p27714242.html Sent from the Request Tracker - User mailing list archive at Nabble.com. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Move tickets to Queue
On Tue, 2010-02-23 at 14:16 +0100, polloxx wrote: Thanks for all your suggestions. How can I do this using Scrips, so without the need to go to /etc/aliases? I am also interested in trying to setup the same thing with a Scrip in RT. We currently have a script that runs via procmail, which looks for certain keywords and automatically re-route tickets to the appropriate queue before ticket creation. We use this for automatic ticket exchanges with a sister support center that is using FootPrints, but we are in the process of testing an improved system that won't use email exchanges. Instead it uses a SOAP interface on the FP side and REST on RT. Because there will be no more email to intercept before RT and I would like to do the queue routing on the receiving side (RT), I would like to have a Scrip in RT that can change the Queue for a ticket before it is created. Is this even possible in RT with an On Create condition and custom action preparation or cleanup code? I am not sure how, or if it is even possible to intercept and change the parameters of a ticket creation transaction before it is created. I tried a Scrip similar to the one that started this thread, which did work for me, but it effectively created the ticket in the original queue, then moved it to the new queue, with only the queue change email going to the watchers of the new queue and the original ticket request going to the watchers of the original queue. Is what I am trying to do even possible with a Scrip in RT? ~Jason -- /--\ | Jason A. Smith Email: smit...@bnl.gov | | Atlas Computing Facility, Bldg. 510MPhone: +1-631-344-4226 | | Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 | | Upton, NY 11973-5000, U.S.A. | \--/ smime.p7s Description: S/MIME cryptographic signature ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] AssetTracker 1.2.4b1 and RT-Billing
Hi there, i just need some information. I´ve searched for a Billing Module for RT and found RT-Billing at http://mattwork.potsdam.edu/projects/wiki/index.php/RT-Billing but there i can´t find any Link to a Download. On this site there´s a hint to AssetTracker and I tried to test it, maybe RT-Billing is included ?! I found AT-1.2.3.zip to download. After a little bit searching I´ve read that it is only for RT version 3.6 and not 3.8. Okay I need Version 1.2.4b1, but i can´t find it. Tried to check it out from googlecode via svn, but the link there is broken. Maybe you have an answer for me where I can download these Extensions ?? Thanks a lot Christian___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Show Relations
Hi @ all, hope it´s okay to send a second question. I try to use Show Relations from http://www.systemaniacs.de/wordpress/?page_id=122 but i get the following error : Error during compilation of /opt/rt3/local/html/Search/Relations.html: my variable $i masks earlier declaration in same scope at /opt/rt3/local/html/Search/Relations.html line 25. my variable $m masks earlier declaration in same scope at /opt/rt3/local/html/Search/Relations.html line 26. my variable $m masks earlier declaration in same scope at /opt/rt3/local/html/Search/Relations.html line 26. my variable $m masks earlier declaration in same statement at /opt/rt3/local/html/Search/Relations.html line 26. Scalar found where operator expected at /opt/rt3/local/html/Search/Relations.html line 89, near $m Global symbol %while requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 25. syntax error at /opt/rt3/local/html/Search/Relations.html line 25, near % while ( (Might be a runaway multi-line '' string starting on line 9) my variable $RT::WebPath can't be in a package at /opt/rt3/local/html/Search/Relations.html line 26, near ($RT::WebPath Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 41. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 42. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 42. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 43. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 43. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 44. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 45. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 46. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 57. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 58. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 58. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 59. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 59. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 60. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 61. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 62. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 73. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 74. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 74. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 75. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 75. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 76. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 77. Global symbol $original requires explicit package name at /opt/rt3/local/html/Search/Relations.html line 78. /opt/rt3/local/html/Search/Relations.html has too many errors. Does anybody know what i should do to repair it ??? Thanks Christian___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Script problem in the Create Ticket screen
On Tue 23.Feb'10 at 10:10:49 -, richard.hell...@stfc.ac.uk wrote: Hi, This may well be old hat and fixed in the latest version but I thought I’d report it just in case. Indeed it is already fixed. For the future, it's always good to mention which version of RT you're reporting a bug in. Best, Jesse ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] forward ticket transaction system record
On Fri 19.Feb'10 at 14:41:16 -0500, Eleanor J. Evans [Panix Staff] wrote: RT doesn't seem to record forwards of tickets transactions. Am I just missing something, or do I need to add it? It's not you. It's something I consider to be a deficiency in the current implementation. I'd love a patch. Best, Jesse signature.asc Description: Digital signature ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 23 Dublin, Ireland - Mar 15 16 Boston, MA, USA - April 5 6 Washington DC, USA - Oct 25 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com