[rt-users] using RT components in console script
I am trying to make a console script, which will get the hash of params form RT_SiteConfig.pm, and then call a mason component (component forms a pdf report and send it by mail). This script should be run by cron. I don't know how to include RT components correctly. While looking at rt-crontool, I made this: While trying to run this ./console I get: What is the corrent way of using RT components in perl console script? -- View this message in context: http://requesttracker.8502.n7.nabble.com/using-RT-components-in-console-script-tp58458.html Sent from the Request Tracker - User mailing list archive at Nabble.com. -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] Problem in searching date
Hi Alex, I found the cause of this issue. It's not a problem with midnight Sunday or something, it is about the Custom Field. I set the build-in Starts date to Proposed Start Time(GMT), then run Queue = 'ChangeRequest' AND Status != 'Closed' AND Starts 'midnight Sunday before last' , it returns the expected results. But when I change Starts to 'CF.{Proposed Start Time(GMT)}', it returns nothing. Does 'CF.{Proposed Start Time(GMT)}' return a datetime value? Or, how can I set Starts and Due date in scrip? Please help on these questions, thank a lot! Br Vodar On Thu, Sep 4, 2014 at 4:53 AM, Kevin Falcone falc...@bestpractical.com wrote: On Wed, Sep 03, 2014 at 04:40:04PM +0800, Chrilly Cheng wrote: Hi Alex, Thanks a lot for your explanation. I've done that config to set $AmbiguousDayInPast to 1, but the query still not work. I changed it a little bit: Queue = 'ChangeRequest' AND ( Status = 'InProgress' Or Status = 'WaitingforApproval' ) AND 'CF.{Proposed Start Time(GMT)}' 'midnight Sunday' AND 'CF.{Proposed Start Time(GMT)}' 'midnight next Sunday' This query needs to be executed every Wednesday to send out dashboard report. It will search for tickets whose Proposed Start Time is between last Sunday and this Sunday. And unfortunately, I cant find any log about this query. I'm using it on the New Search page, does there have any other way to test query? A few things Your use of GMT in the CF name is... misleading, since Fields are set in the User's Time Zone, this may not work out as you intend. Additionally, relative dates are going to be calculated in the user's time zone. This means midnight next sunday will *actually* be 2014-09-07 04:00:00 when it goes and looks in the DB (since I'm four hours behind GMT). Keep in mind also, did you mean Midnight at the start of sunday or midnight at the end of sunday? You can get exact parsing of the query by running code on the command line. Save this in a file and run it. use lib '/opt/rt4/lib/'; use RT -init; my $t = RT::Tickets-new(RT-SystemUser); $t-FromSQL(Your Query); warn $t-BuildSelectQuery; -kevin -- RT Training - Boston, September 9-10 http://bestpractical.com/training -- RT Training - Boston, September 9-10 http://bestpractical.com/training
[rt-users] Saved system search, created tickets
Hello Is there way to create saved system search to search tickets user created? This way creator - is - [me] Regards Tomi -- RT Training - Boston, September 9-10 http://bestpractical.com/training
[rt-users] Include Template in another template
Hey there, I would like to know if there is any possibility to include a template into another one. To clearify what I would like to do: I want to put the name of the company and some other legal information on the bottom of any email that is outgoing, but in case of a change I don't want to edit every template. So i just would like to create a template called Footer and include this in every other template. Thanks in advance, Tobias -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] Problem in searching date
On Fri, Sep 05, 2014 at 04:46:35PM +0800, Chrilly Cheng wrote: I found the cause of this issue. It's not a problem with midnight Sunday or something, it is about the Custom Field. I set the build-in Starts date to Proposed Start Time(GMT), then run Queue = 'ChangeRequest' AND Status != 'Closed' AND Starts 'midnight Sunday before last' , it returns the expected results. But when I change Starts to 'CF.{Proposed Start Time(GMT)}', it returns nothing. Does 'CF.{Proposed Start Time(GMT)}' return a datetime value? Or, how can I set Starts and Due date in scrip? If what you want to do didn't work, I wouldn't have told you to keep trying it. What you tried to do works perfectly fine for me locally on 4.2-trunk (what was released last night as 4.2.7rc1). With all the caveats I pointed out about time zones and parsing of sunday. See my example. You've never stated your RT version that I can see, so I assume you're using a version that didn't support this. If you have an example of: exact custom field configuration data in CFs query written and *executed* using the script I sent so that we see the SQL produced, then we can look deeper. -kevin pgpzt0oLXdhLi.pgp Description: PGP signature -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] Saved system search, created tickets
On Fri, Sep 05, 2014 at 11:52:05AM +0300, Tomi Viikari wrote: Is there way to create saved system search to search tickets user created? This way creator - is - [me] Click on the edit tab for My Tickets on the home page and click through to edit the search. You'll see the special __CurrentUser__ syntax. -kevin pgpFVXqU5knVK.pgp Description: PGP signature -- RT Training - Boston, September 9-10 http://bestpractical.com/training
[rt-users] Custom field description.
Hi, I would like to known what's the purpose of « Description » for a Custom Field ? I always see the « Name » of the Custom Field (in the web interface) so that's make the name very ... long. For example if I create a CF with with : name : loca description : Location of the problem I'm going to see Loca : in the web interface. So that's force me to create a custom field with name : Location of the problem. (and that's is a short one...) Regards. JAS -- Albert SHIH DIO bâtiment 15 Observatoire de Paris 5 Place Jules Janssen 92195 Meudon Cedex France Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71 xmpp: j...@obspm.fr Heure local/Local time: ven 5 sep 2014 15:32:25 CEST -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] Custom field description.
On Fri, Sep 05, 2014 at 03:37:09PM +0200, Albert Shih wrote: I would like to known what's the purpose of « Description » for a Custom Field ? At this time, it is only used to aid Admins in knowing the purpose of the custom field. Patches to add callbacks to ShowCustomFields and EditCustomFields to make adding additional descriptive text easier welcome. -kevin I always see the « Name » of the Custom Field (in the web interface) so that's make the name very ... long. For example if I create a CF with with : name : loca description : Location of the problem I'm going to see Loca : in the web interface. So that's force me to create a custom field with name : Location of the problem. (and that's is a short one...) Regards. JAS -- Albert SHIH DIO bâtiment 15 Observatoire de Paris 5 Place Jules Janssen 92195 Meudon Cedex France Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71 xmpp: j...@obspm.fr Heure local/Local time: ven 5 sep 2014 15:32:25 CEST -- RT Training - Boston, September 9-10 http://bestpractical.com/training pgpzn814YqelY.pgp Description: PGP signature -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] Include Template in another template
On Fri, Sep 05, 2014 at 01:57:15PM +0200, Tobias H. wrote: I would like to know if there is any possibility to include a template into another one. To clearify what I would like to do: I want to put the name of the company and some other legal information on the bottom of any email that is outgoing, but in case of a change I don't want to edit every template. So i just would like to create a template called Footer and include this in every other template. While you can load another template and parse it and included it, for a footer I'd honestly write a tiny extension with package RT::Site::Foo::Emails; sub Footer { return long footer string; } 1; install that and from my templates just call { RT::Site::Foo::Emails::Footer() } and be done with it. Loading and parsing and including another template is almost always more error prone. -kevin pgp8AgWVYCDLN.pgp Description: PGP signature -- RT Training - Boston, September 9-10 http://bestpractical.com/training
[rt-users] Help please ActivityReport extension doesn't work
Help please. Suddenly my Extension ActivityReport stop working. I'm getting: An internal RT error has occurred. Your administrator can find more details in RT's log files. My log file: [24927] [Sat Sep 6 05:27:11 2014] [error]: read_file: could not open file '/opt/rt4/local/plugins/RT-Extension-ActivityReports/html/Reports/Activity/Elements/Wrapper' for reading: Permission denied Any one can give me clue how to fix this issue. I'm running 4.2.1 / RH6 Thank you, David -- RT Training - Boston, September 9-10 http://bestpractical.com/training