Re: [rt-users] Need to send Big Cheese email based on requestor's email or group membership
Hi Chris, Thanks for the reply back. So there is no way to do the check dynamically in case the members of the Big Cheese group change randomlyvia grep'ing a file with all the email addresses in it, or quering a Window AD group on the fly ? We would have to maintain the group in RT manually as members change ? Thanks, Mike -Original Message- From: Christian Loos [mailto:cl...@netcologne.de] Sent: Friday, January 17, 2014 2:48 AM To: Ethier, Michael Cc: rt-users@lists.bestpractical.com Subject: Re: Need to send Big Cheese email based on requestor's email or group membership Hi, for this type of requests we create an group inside RT, add all email adresses (RT User) to this Group, add all User that should be notified as AdminCc to the queue and then create a scrip (replace xxx with the Big Cheese group id): Condition: User Defined Action: Notify AdminCcs Template: you custom email template Stage: TransactionCreate Custom condition: return 0 unless $self-TransactionObj-Type eq 'Create'; my $CreatorObj = $self-TransactionObj-CreatorObj; my $GroupObj = RT::Group-new(RT-SystemUser); $GroupObj-Load(xxx); # Big Cheese Group Id return 1 if $GroupObj-HasMember($CreatorObj-PrincipalId); return 0; Chris
Re: [rt-users] Need help about scrip condition
On Thu, Jan 16, 2014 at 06:57:12PM +0100, Eric MAISONOBE wrote: So i have 2 questions : - what's the way to check if the comment creator is Enoch root, and in this case (and only in this case) to notify the comment to 'OtherRecipients', Something like this (untested): my $RootUser = RT::User-new( $self-CurrentUser ); $RootUser-Load( 'root' ); if ($Transaction-CreatorObj-id == $RootUser-id ) { ... - moreover, where can i found the code corresponding to default conditions and actions pre-existing in RT web interface ? Conditions: lib/RT/Condition/*.pm Actions: lib/RT/Action/*.pm -- Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 43 35 00 76 mailto:elac...@easter-eggs.com - http://www.easter-eggs.com
Re: [rt-users] How to find possible values for an object
On Thu, Jan 16, 2014 at 12:21:54PM -0800, rwzoerner wrote: I'm not a Perl programmer and the documentation for RT isn't very friendly for folks like me. I'm trying to put the ticket owner's full name in a template, for example, and I can't find anything that tells me what the possible values are for {$Ticket-OwnerObj}. I did see a snippet that used {$Ticket-OwnerObj-Name} but that displays just the username, not the full name. OwnerObj is an RT::User, so you have all methods available here: http://www.bestpractical.com/docs/rt/4.2/RT/User.html (You wan't -RealName here). Aside from needing to resolve that specific problem, is there a way a non-Perl-person can find what values are possible for other objects, as well? Each object have a corresponding .pm file in lib/RT/ (User.pm, Ticket.pm, ...). You can do perldoc lib/RT/pm to see available methods or use the online documentation above) -- Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 43 35 00 76 mailto:elac...@easter-eggs.com - http://www.easter-eggs.com
Re: [rt-users] Need to send Big Cheese email based on requestor's email or group membership
Am 17.01.2014 14:27, schrieb Ethier, Michael: Hi Chris, Thanks for the reply back. So there is no way to do the check dynamically in case the members of the Big Cheese group change randomlyvia grep'ing a file with all the email addresses in it, or quering a Window AD group on the fly ? We would have to maintain the group in RT manually as members change ? Thanks, Mike I just want to show you the way we have done things like this. Within RT scrips you can do with Perl what ever you want. Chris
Re: [rt-users] How to create a scrip Condition for OnAddRequestor
On Thu, Jan 16, 2014 at 12:29:12PM -0800, rwzoerner wrote: I found a list of condition snippets that was great, but for all it had, it missed any examples related to when a new requestor is added. One scenario is that technicians frequently take a phone call and create the ticket for the requestor. That makes them the requestor and then they have to go in and change it to the correct person. you may: - disable CurrentUser to be the default requestor (empty field) - use RT::Extension::MendatoryRequestor to force your staff to enter a valid one that would reduce the wrong requestors. you may also tweak your IPBX to create the ticket and lookup the requestor in a directory (hints: asterisk, RT REST access, LDAP/Customer database) ;) Another possibility is that they simply need to add a second name as requestor. Even it's allowed to use multiple requestors in RT, I personnaly don't like this as it may make things complicate when it comes to automate based on requestor. But if you wan't to do so, your staff can: - do it when creating the ticket, their email, customer email in Requestor field - do it after ticket creation using the People link in the ticket menu. -- Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 43 35 00 76 mailto:elac...@easter-eggs.com - http://www.easter-eggs.com
Re: [rt-users] How to find possible values for an object
Thanks! I guess the trick is for me to learn how to navigate the documentation. It probably makes perfect sense to a Perl programmer or more experienced RT user - I didn't even make that connection, though. I appreciate it! -Rick On 1/17/2014 7:38 AM, Emmanuel Lacour [via RequestTracker] wrote: On Thu, Jan 16, 2014 at 12:21:54PM -0800, rwzoerner wrote: I'm not a Perl programmer and the documentation for RT isn't very friendly for folks like me. I'm trying to put the ticket owner's full name in a template, for example, and I can't find anything that tells me what the possible values are for {$Ticket-OwnerObj}. I did see a snippet that used {$Ticket-OwnerObj-Name} but that displays just the username, not the full name. OwnerObj is an RT::User, so you have all methods available here: http://www.bestpractical.com/docs/rt/4.2/RT/User.html (You wan't -RealName here). Aside from needing to resolve that specific problem, is there a way a non-Perl-person can find what values are possible for other objects, as well? Each object have a corresponding .pm file in lib/RT/ (User.pm, Ticket.pm, ...). You can do perldoc lib/RT/pm to see available methods or use the online documentation above) -- Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 43 35 00 76 mailto:[hidden email] /user/SendEmail.jtp?type=nodenode=56336i=0 - http://www.easter-eggs.com If you reply to this email, your message will be added to the discussion below: http://requesttracker.8502.n7.nabble.com/How-to-find-possible-values-for-an-object-tp56324p56336.html To unsubscribe from How to find possible values for an object, click here http://requesttracker.8502.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=56324code=cmlja0B6b2VybmVyLmNvbXw1NjMyNHwtMTczNDEzOTU5OQ==. NAML http://requesttracker.8502.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://requesttracker.8502.n7.nabble.com/How-to-find-possible-values-for-an-object-tp56324p56340.html Sent from the Request Tracker - User mailing list archive at Nabble.com.
Re: [rt-users] How to create a scrip Condition for OnAddRequestor
Emmanuel, Thanks for great input but those things we are already doing. The key, though, is that when a new requester IS added, for any reason, they need to receive an email (the Autoreply template, actually) letting them know. That's what I need the condition for - how to trap the addition of a new Requester so I can then Notify Requesters in a scrip. The normal scrip only fires On Create - I need one to fire On Add Requester. Thanks, -Rick On 1/17/2014 7:43 AM, Emmanuel Lacour [via RequestTracker] wrote: On Thu, Jan 16, 2014 at 12:29:12PM -0800, rwzoerner wrote: I found a list of condition snippets that was great, but for all it had, it missed any examples related to when a new requestor is added. One scenario is that technicians frequently take a phone call and create the ticket for the requestor. That makes them the requestor and then they have to go in and change it to the correct person. you may: - disable CurrentUser to be the default requestor (empty field) - use RT::Extension::MendatoryRequestor to force your staff to enter a valid one that would reduce the wrong requestors. you may also tweak your IPBX to create the ticket and lookup the requestor in a directory (hints: asterisk, RT REST access, LDAP/Customer database) ;) Another possibility is that they simply need to add a second name as requestor. Even it's allowed to use multiple requestors in RT, I personnaly don't like this as it may make things complicate when it comes to automate based on requestor. But if you wan't to do so, your staff can: - do it when creating the ticket, their email, customer email in Requestor field - do it after ticket creation using the People link in the ticket menu. -- Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 43 35 00 76 mailto:[hidden email] /user/SendEmail.jtp?type=nodenode=56338i=0 - http://www.easter-eggs.com If you reply to this email, your message will be added to the discussion below: http://requesttracker.8502.n7.nabble.com/How-to-create-a-scrip-Condition-for-OnAddRequestor-tp56325p56338.html To unsubscribe from How to create a scrip Condition for OnAddRequestor, click here http://requesttracker.8502.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=56325code=cmlja0B6b2VybmVyLmNvbXw1NjMyNXwtMTczNDEzOTU5OQ==. NAML http://requesttracker.8502.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://requesttracker.8502.n7.nabble.com/How-to-create-a-scrip-Condition-for-OnAddRequestor-tp56325p56339.html Sent from the Request Tracker - User mailing list archive at Nabble.com.
Re: [rt-users] How to create a scrip Condition for OnAddRequestor
On Fri, Jan 17, 2014 at 07:10:43AM -0800, rwzoerner wrote: Emmanuel, Thanks for great input but those things we are already doing. The key, though, is that when a new requester IS added, for any reason, they need to receive an email (the Autoreply template, actually) letting them know. That's what I need the condition for - how to trap the addition of a new Requester so I can then Notify Requesters in a scrip. The normal scrip only fires On Create - I need one to fire On Add Requester. For your UserDefined condition, adding a Requestor is matched via: if ( $self-TransactionObj-Type eq 'AddWatcher' $self-TransactionObj-Field eq 'Requestor' ) { ... you may check also that we are adding a requestor and not changing an existing one: if ( ! $self-TransactionObj-OldValue ) { The new requestor id will be in $self-TransactionObj-NewValue, you have to load it as a RT::User to get the EmailAddress and use it in your template. -- Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 43 35 00 76 mailto:elac...@easter-eggs.com - http://www.easter-eggs.com
Re: [rt-users] Reset Scrips to Default?
On Thu, Jan 16, 2014 at 05:45:17PM -0500, Ryan Skadberg wrote: I've searched through Google and the list archives, but can't seem to find any methodology for doing this. In the archives, I saw a script that was in the GIT tree called fixup-default-scrips, but a) I don't see it in the release tar and b) I'm guessing it might have been for internal dev, not for what I am doing. While theoretically possible to do some surgery on the tables and reinsert, you'd have to be quite careful. You could mess around on a test instance disabling/deleting all your scrips/scripactions/scripconditions/templates and then using the Initialdata docs to insert part of our initial data. I'd probably just stand up a tiny 4.2 instance and use it as a reference to clean up the existing Scrips rather than risk the surgery. I expect what you found in git was actually the branch 4.2/fixup-default-scrips which we merged and which was making some changes to the default set of scrips that RT ships with. -kevin pgp1oTjqH1nOo.pgp Description: PGP signature
Re: [rt-users] How far can categories nest?
On Thu, Jan 16, 2014 at 12:07:14PM -1000, Mathew Snyder wrote: I have three custom fields I'd like linked: Support Type, Support Category, and Support Sub-Category. Support Type has not Categories are based on set. Support Category has Categories are based on set to Support Type Support Sub-Category has Categories are based on set to Support Category. When I select the Support Type, Support Category populates with the expected values (In this case, Hardware, Software, and Telephony). However, when I select Support Category, Support Sub-Category does not populate. The categories are configured for each entry in Support Sub-Category. Do categories only go one level? You didn't state your RT version, but if you search http://bestpractical.com/release-notes/rt/4.2.2 for Custom Field you'll find a likely bugfix. -kevin pgpRowTWnq_z4.pgp Description: PGP signature
[rt-users] Real time fulltext search/indexing with sphinx
Hi, as you can see on these slides: http://www.slideshare.net/AdrianNuta1/real-time-fulltext-search-with-sphinx ... it is now possible with sphinx to allow for actual realtime searching, something that I have come to realize while researching, not even postgresql allows for. There is a caveat to this though: this functionality is not transparent to the application, meaning that RT would need to be modified to support this. Is this being worked on already, or is this something that could be suggested? Regards, ms
[rt-users] Import a text file into RT as a scrip ?
Hi, I have a text file (exact RT scrip syntax) that sits on our RT server that I would like to import into RT and update(overwrite) a particular scrip's custom condition with it on a regular basis. Is this possible ? And if yes, how ? Thanks, Mike
Re: [rt-users] How to create a scrip Condition for OnAddRequestor
Thanks! I think that is exactly what I needed. -Rick On 1/17/2014 9:52 AM, Emmanuel Lacour [via RequestTracker] wrote: On Fri, Jan 17, 2014 at 07:10:43AM -0800, rwzoerner wrote: Emmanuel, Thanks for great input but those things we are already doing. The key, though, is that when a new requester IS added, for any reason, they need to receive an email (the Autoreply template, actually) letting them know. That's what I need the condition for - how to trap the addition of a new Requester so I can then Notify Requesters in a scrip. The normal scrip only fires On Create - I need one to fire On Add Requester. For your UserDefined condition, adding a Requestor is matched via: if ( $self-TransactionObj-Type eq 'AddWatcher' $self-TransactionObj-Field eq 'Requestor' ) { ... you may check also that we are adding a requestor and not changing an existing one: if ( ! $self-TransactionObj-OldValue ) { The new requestor id will be in $self-TransactionObj-NewValue, you have to load it as a RT::User to get the EmailAddress and use it in your template. -- Easter-eggs Spécialiste GNU/Linux 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 43 35 00 76 mailto:[hidden email] /user/SendEmail.jtp?type=nodenode=56341i=0 - http://www.easter-eggs.com If you reply to this email, your message will be added to the discussion below: http://requesttracker.8502.n7.nabble.com/How-to-create-a-scrip-Condition-for-OnAddRequestor-tp56325p56341.html To unsubscribe from How to create a scrip Condition for OnAddRequestor, click here http://requesttracker.8502.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=56325code=cmlja0B6b2VybmVyLmNvbXw1NjMyNXwtMTczNDEzOTU5OQ==. NAML http://requesttracker.8502.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://requesttracker.8502.n7.nabble.com/How-to-create-a-scrip-Condition-for-OnAddRequestor-tp56325p56347.html Sent from the Request Tracker - User mailing list archive at Nabble.com.
Re: [rt-users] How far can categories nest?
Sorry. 4.2.1. -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 6:15 AM, Kevin Falcone falc...@bestpractical.comwrote: On Thu, Jan 16, 2014 at 12:07:14PM -1000, Mathew Snyder wrote: I have three custom fields I'd like linked: Support Type, Support Category, and Support Sub-Category. Support Type has not Categories are based on set. Support Category has Categories are based on set to Support Type Support Sub-Category has Categories are based on set to Support Category. When I select the Support Type, Support Category populates with the expected values (In this case, Hardware, Software, and Telephony). However, when I select Support Category, Support Sub-Category does not populate. The categories are configured for each entry in Support Sub-Category. Do categories only go one level? You didn't state your RT version, but if you search http://bestpractical.com/release-notes/rt/4.2.2 for Custom Field you'll find a likely bugfix. -kevin
Re: [rt-users] How far can categories nest?
Looks like I'll be upgrading to 4.2.2. Fortunately, this isn't in production yet. -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 11:41 AM, Mathew Snyder mathew.sny...@gmail.comwrote: Sorry. 4.2.1. -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 6:15 AM, Kevin Falcone falc...@bestpractical.comwrote: On Thu, Jan 16, 2014 at 12:07:14PM -1000, Mathew Snyder wrote: I have three custom fields I'd like linked: Support Type, Support Category, and Support Sub-Category. Support Type has not Categories are based on set. Support Category has Categories are based on set to Support Type Support Sub-Category has Categories are based on set to Support Category. When I select the Support Type, Support Category populates with the expected values (In this case, Hardware, Software, and Telephony). However, when I select Support Category, Support Sub-Category does not populate. The categories are configured for each entry in Support Sub-Category. Do categories only go one level? You didn't state your RT version, but if you search http://bestpractical.com/release-notes/rt/4.2.2 for Custom Field you'll find a likely bugfix. -kevin
Re: [rt-users] How far can categories nest?
I just upgraded and the custom fields still aren't cascading properly. After selecting the first one the second populates, but after selecting the second one the third does not. CentOS 6.5, FastCGI, RT 4.2.2, MySQL 5.1.71-1 -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 11:43 AM, Mathew Snyder mathew.sny...@gmail.comwrote: Looks like I'll be upgrading to 4.2.2. Fortunately, this isn't in production yet. -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 11:41 AM, Mathew Snyder mathew.sny...@gmail.comwrote: Sorry. 4.2.1. -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 6:15 AM, Kevin Falcone falc...@bestpractical.com wrote: On Thu, Jan 16, 2014 at 12:07:14PM -1000, Mathew Snyder wrote: I have three custom fields I'd like linked: Support Type, Support Category, and Support Sub-Category. Support Type has not Categories are based on set. Support Category has Categories are based on set to Support Type Support Sub-Category has Categories are based on set to Support Category. When I select the Support Type, Support Category populates with the expected values (In this case, Hardware, Software, and Telephony). However, when I select Support Category, Support Sub-Category does not populate. The categories are configured for each entry in Support Sub-Category. Do categories only go one level? You didn't state your RT version, but if you search http://bestpractical.com/release-notes/rt/4.2.2 for Custom Field you'll find a likely bugfix. -kevin
Re: [rt-users] How far can categories nest?
For clarification: First CF: Support Type (ST) - System Support - User Support Second CF: Support Category (SC) - Hardware - System Support - Software - System Support - Telephony - System Support - New Employee - User Support - Promotion - User Support - Temp Employee - User Support Third CF: Support Sub-Category (SSC) - Mobile Phone - Hardware - Computer - Hardware - VPN - Software - Anti-virus - Software - Email - Software - Networking - Telephony - Phones - Telephony This is the original order for I have found that the bug mentioned by Kevin persists in version 4.2.2, at least, in my case, after upgrading from 4.2.1. Selecting System Support will populate Support Category, but selecting a value from Support Category will not populate Support Sub-Category. As a matter of troubleshooting I have moved Support Sub-Category above Support Category and found that SSC will populate with one of the categories described by SC and all of the associated options (specifically, the Software category). However, changing the value of SC still does not cascade into SSC. SSC retains the Software sub-category and its values and only the Software sub-category regardless of the SC chosen. Reverting the custom fields to their original order does not alter this nor does it go back to not displaying *any* values in SSC. Example: Selecting System Support from Support Type populates Support Category with Hardware, Software, and Telephony. Selecting Hardware from Support Category populates Support Sub-Category with - Software - VPN - Anti-virus - Email No value is selected. Selecting Telephony from Support Category populates Support Sub-Category with - Software - VPN - Anti-virus - Email No value is selected. Instead of - Telephony - Networking - Phones /Example Selecting User Support from Support Type populates Support Category with all of the expected, relevant values under Support Category. There are no associated Support Sub-Category values for User Support. However, the same issue as above is present. The SSC field is still populated with the Software sub-category. -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 12:04 PM, Mathew Snyder mathew.sny...@gmail.comwrote: I just upgraded and the custom fields still aren't cascading properly. After selecting the first one the second populates, but after selecting the second one the third does not. CentOS 6.5, FastCGI, RT 4.2.2, MySQL 5.1.71-1 -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 11:43 AM, Mathew Snyder mathew.sny...@gmail.comwrote: Looks like I'll be upgrading to 4.2.2. Fortunately, this isn't in production yet. -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 11:41 AM, Mathew Snyder mathew.sny...@gmail.comwrote: Sorry. 4.2.1. -Mathew When you do things right, people won't be sure you've done anything at all. - God; Futurama We'll get along much better once you accept that you're wrong and neither am I. - Me On Fri, Jan 17, 2014 at 6:15 AM, Kevin Falcone falc...@bestpractical.com wrote: On Thu, Jan 16, 2014 at 12:07:14PM -1000, Mathew Snyder wrote: I have three custom fields I'd like linked: Support Type, Support Category, and Support Sub-Category. Support Type has not Categories are based on set. Support Category has Categories are based on set to Support Type Support Sub-Category has Categories are based on set to Support Category. When I select the Support Type, Support Category populates with the expected values (In this case, Hardware, Software, and Telephony). However, when I select Support Category, Support Sub-Category does not populate. The categories are configured for each entry in Support Sub-Category. Do categories only go one level? You didn't state your RT version, but if you search http://bestpractical.com/release-notes/rt/4.2.2 for Custom Field you'll find a likely bugfix. -kevin