Re: [rt-users] Custom Scrip that sometimes emails?
On Mon, Jan 16, 2012 at 07:35, John Hascall j...@iastate.edu wrote: I have a custom scrip that does quite a lot of parsing of the content of an incoming email during ticket creation. Now I've been asked that under certain circumstances, determined by what it finds/doesn't find in the email, this scrip also send an email (to the requestor as well as possibly to an email address found in the message). Use second scrip that emails with Notify* actions. Probably your parser also updates ticket with info it found, so you can create condition that finds required situation. How do I insure that the two scrips execute in the correct order? Thanks, John RT Training Sessions (http://bestpractical.com/services/training.html) * Boston March 5 6, 2012
Re: [rt-users] Custom Scrip that sometimes emails?
On Mon, Jan 16, 2012 at 19:19, John Hascall j...@iastate.edu wrote: On Mon, Jan 16, 2012 at 07:35, John Hascall j...@iastate.edu wrote: I have a custom scrip that does quite a lot of parsing of the content of an incoming email during ticket creation. Now I've been asked that under certain circumstances, determined by what it finds/doesn't find in the email, this scrip also send an email (to the requestor as well as possibly to an email address found in the message). Use second scrip that emails with Notify* actions. Probably your parser also updates ticket with info it found, so you can create condition that finds required situation. How do I insure that the two scrips execute in the correct order? I think in 3.8.1 we already order scrips by description, may be it's by id. However, you don't need it. Changes from a scrip fire new scrips. In second scrip you check that particular field was set by transaction, check new and old values, check other required fields and decide whether fire or not notification action. Advantage of this is that notification is fired even when people through UI changed ticket in similar way as your parser. So, just to be sure I understand this correctly. The existing scrip, upon finding that the email is required, sets the value of a custom field (say, email = needed) This setting of a custom field will trigger RT to run through the list of scrips again. The condition of the new, (emailing), scrip is based on the custom field value (email==needed), so it is triggered on this run through. This scrip, after emailing, should, I would guess, then update the CF (say, email = sent). Correct? I am guessing that there is some way to not reinvent the wheel and use the abilities of an exist action, perhaps by being a subclass of it? Possible? Pointers on how? Many thanks, John RT Training Sessions (http://bestpractical.com/services/training.html) * Boston March 5 6, 2012
[rt-users] Custom Scrip that sometimes emails?
I have a custom scrip that does quite a lot of parsing of the content of an incoming email during ticket creation. Now I've been asked that under certain circumstances, determined by what it finds/doesn't find in the email, this scrip also send an email (to the requestor as well as possibly to an email address found in the message). I'm guessing this can't be that hard to do, but I've read the RT Essentials book and google'd everything I can think of to no avail. Does anyone know how to do this? (it's RT 3.8.1 if that matters) Thanks, John RT Training Sessions (http://bestpractical.com/services/training.html) * Boston March 5 6, 2012
[rt-users] Scrip chaining
If, in the custom action for the On Create scrip of queue A, I resolve the ticket and change the queue to B, which runs? ? The On Resolve scrip for queue A ? The On Resolve scrip for queue B ? Both ? Neither ? It depends on the order of the resolve and the close in the 'On Create' scrip. And is this, whatever the answer is, something I can depend upon? Many thanks, John RT Training Sessions (http://bestpractical.com/services/training.html) * San Francisco, CA, USA October 18 19, 2011 * Washington DC, USA October 31 November 1, 2011 * Barcelona, Spain November 28 29, 2011
Re: [rt-users] 1; in the RT_SiteConfig.pm file
Wagner Pereira wrote: My 'easy' question is: what this 1; does at the final? What is its utility? I don't remember if I had put it there or RT came with it by default. 1; All good Perl modules have this as the exit code/value at the end. More specifically, if I may quote from Wikipedia... # A Perl module must end with a true value or else it is considered not to # have loaded. By convention this value is usually 1 though it can be # any true value. A module can end with false to indicate failure but # this is rarely used and it would instead die() (exit with an error). John Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Too many tickets in queue?
I received a query from one of our users who is seeing tickets backing up in their queue because they are not able to handle the volume at present and he is wondering if there is a point where that volume will adversely impact the perforance of RT. I'm thinking that number must be very large, but I'm wondering if anyone has any more concrete experience. Thanks, John --- John Hascall, j...@iastate.edu Team Lead, NIADS (Network Infrastructure, Authentication Directory Services) IT Services, The Iowa State University of Science and Technology Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Can a global scrip be disabled for a given queue?
When I wanted to do a similar thing, I found it easier to modify the global scrip (Custom Condition) to recognize a special address in that field for the queue: return (($self-TransactionObj-Type eq Correspond) ($self-TicketObj-QueueObj-CorrespondAddress() ne NONE)); John --- John Hascall, j...@iastate.edu Team Lead, NIADS (Network Infrastructure, Authentication Directory Services) IT Services, The Iowa State University of Science and Technology Hello, I have the requirements to not send notifications 'on correspond' to the requestors for a given queue (that's scrip #6). But I wish to keep it for other queues. Do I need to disable it (scrip fields Stage Disabled) and then recreate it locally for all the other queues? Thanks, Thierry Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Possible to forward a ticket (including CFs) out of RT via email?
Is it possible to forward a ticket (including any custom fields) out of RT via email? Thanks, John --- John Hascall, j...@iastate.edu Team Lead, NIADS (Network Infrastructure, Authentication Directory Services) IT Services, The Iowa State University of Science and Technology ___ 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] radical...
On Mon, Mar 01, 2010 at 06:58:09AM +, Kobus Bensch - Networker wrote: Why is this rubbish allowed on here? It's off-topic. Well, if I had 55 wives I'd definitely need RT for the Honey Do list! :) John PS, yes, I know the mainstream church doesn't do the plural thing any more. ___ 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] Enumerate Ticket Custom Fields
In an external perl script, given a ticket object, how would I enumerate the names and values of the (queue-specific) custom fields attached to that ticket? Many thanks for any pointers! John PS, I tried looking around the wiki, but I didn't see anuthing relevant. ___ 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] E-Mail Ticket Parsing and Decoding
Hi all, As my first real RT project I need to write a Scrip to parse values out of an email at ticket creation time and set some Custom Fields. Because the data is structured (xml) it looks like ExtractCustomFieldValues probably isn't going to be up to the task. It looks like getting the content/attachments in the Scrip is easy enough: my $xact = $self-TransactionObj; my $tkt = $self-TicketObj; my $cont = $xact-Content; my $atts = $tkt-attachments; my $iter = $attachments-get_iterator; while (my $att = $iter) { my $acont = $att-content; ... } ... So my question is: How much decoding has been done on the content by the time I fetch it? For example, do I need to worry about stuff like mail sent with: Content-Transfer-Encoding: quoted-printable or Content-Transfer-Encoding: base64 or has that already been taken care of? Thanks, John --- John Hascall, j...@iastate.edu Team Lead, NIADS (Network Infrastructure, Authentication Directory Services) IT Services, The Iowa State University of Science and Technology ___ 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] Report Resolved by owner fails to output, generates error in log
SELECT COUNT(main.id) AS id, Users_2.Name AS col1 FROM Tickets main LEFT JOIN Users Users_2 ON ( Users_2.id = main.Owner ) LEFT JOIN Users Users_1 ON ( Users_1.id = main.Owner ) WHERE (main.Status != 'deleted') AND (main.Status = 'resolved' AND main.Queue = '5') AND (main.Type = 'ticket') AND (main.EffectiveId = main.id) GROUP BY Users_2.Name; While we are looking at this query, it seems to me that the first where clause is made redundant by the second one: WHERE (main.Status != 'deleted') AND (main.Status = 'resolved' AND main.Queue = '5') If (main.Status = 'resolved' AND main.Queue = '5') then it must be true that (main.Status != 'deleted') And I don't see any use of the Tickets table. Also, where is the 2nd left join used? Thus: SELECT COUNT(main.id) AS id, Users.Name AS col1 FROM main LEFT JOIN Users ON ( Users.id = main.Owner ) WHERE (main.Status = 'resolved') AND (main.Queue = '5') AND (main.Type = 'ticket') AND (main.EffectiveId = main.id) GROUP BY Users.Name; would seem to be a lot simpler. Or have I overlooked something obvious? John ___ 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] External Auth vs. command line
The rt command line client was just choking on the HTTP 302 redirect (to pubcookie for the external auth). What I ended up doing was creating a clone of the apache virtual host config for the rt tree with a non-pubcookied version with access restricted to 127.0.0.1. So, is this actually a reasonable approach or have I somehow overlooked the right way to handle this? (RT3.8.1 on NetBSD 3.1 if it matters) Thanks, John Hascall Network Infrastructure Iowa State Univ ___ 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] External Auth vs. command line
John Hascall wrote: The rt command line client was just choking on the HTTP 302 redirect (to pubcookie for the external auth). What I ended up doing was creating a clone of the apache virtual host config for the rt tree with a non-pubcookied version with access restricted to 127.0.0.1. So, is this actually a reasonable approach or have I somehow overlooked the right way to handle this? (RT3.8.1 on NetBSD 3.1 if it matters) Better to fix rt CLI to handle external auth cases, although I'm not sure how it wouldn't. Authentication should be transparent to a REST client, yes? I can't think of any decent way to do this portably. Sure, the CLI could recognize the 302-redirect, refetch, handle the cookie business, etc, but when it finally gets to the login form, it would have to parse it to figure out what form variables get the username and password and which button is the login and so on. For your solution you have to be on the RT system to use rt CLI, which isn't necessarily always desirable. If we actually used external auth here, I'm sure I would have submitted a patch by now. :) Being on the RT server is not an issue for us, but as a general case, I see your point. John ___ 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