[rt-users] Thanks for your advice
Dear RT-fans or RT-nerds, thank you for your advice you have given me over the years. I am going to change my working place, in which I will not use the RT anymore. I hope we will see again, soon. Thanks for all, Wolfram We're hiring! http://bestpractical.com/jobs
[rt-users] ValidateCustomFields
On 10/22/12 18:00, rt-users-requ...@lists.bestpractical.com wrote: Send rt-users mailing list submissions to rt-users@lists.bestpractical.com To subscribe or unsubscribe via the World Wide Web, visit http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users or, via email, send a message with subject or body 'help' to rt-users-requ...@lists.bestpractical.com You can reach the person managing the list at rt-users-ow...@lists.bestpractical.com When replying, please edit your Subject line so it is more specific than Re: Contents of rt-users digest... Today's Topics: 1. Friendly Validation Errors? (Mike Kennedy) 2. Re: Size of the database. (Darin Perusich) 3. RT-Authen-ExternalAuth. (Julien CAUNAN) 4. Re: Size of the database. (Albert Shih) -- Message: 1 Date: Mon, 22 Oct 2012 03:27:45 + From: Mike Kennedymichael.kenn...@ucr.edu To: rt-users@lists.bestpractical.com Subject: [rt-users] Friendly Validation Errors? Message-ID: 4377a360f69d024197af65862debcc051fe0c...@exch-mbox-1.exch.ucr.edu Content-Type: text/plain; charset=us-ascii Hello, I've searched the archives, Google, the wiki (so I'm sorry if the answer to this is there, but I just missed it.) Is there any way, short of editing the source, to have more friendly validation errors. So, rather than Input must match [Mandatory] I could change it to say This field is required. Or, instead of Input must match ^[a-zA-Z]+$, it could say, Value must contain only letters. Thanks, Mike Hello Mike, you can change /Elements/ValidateCustomFields in a plugin like that that. The code is like that: my %Messages = ([Mandatory] = This field is required, [^[a-zA-Z]+] = This field must contain letters); foreach my $value( @values ) { next if $CF-MatchPattern($value); my $msg = exists($Messages{$CF-FriendlyPattern}) ?$Messages{$CF-FriendlyPattern} :Input must match.$CF-FriendlyPattern ; $m-notes( ('InvalidField-' . $CF-Id) = $msg ); push @res, $msg; $valid = 0; } That does work. Final RT training for 2012 in Atlanta, GA - October 23 24 http://bestpractical.com/training We're hiring! http://bestpractical.com/jobs
[rt-users] User only load by E-mail or by id
-- Message: 2 Date: Mon, 13 Aug 2012 13:22:50 +0200 From: Gergely Buday gbu...@gmail.com To: rt-users@lists.bestpractical.com Subject: [rt-users] RT::User problem Message-ID: CA+3iOzksxuc4T6hpwyX3=faehzsbpwxhywm3t_-rmex7uqw...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi there, I would like to create a User object through the Load method. The documentation writes: Load a user object from the database. Takes a single argument. If the argument is numerical, load by the column 'id'. If a user object or its subclass passed then loads the same user by id. Otherwise, load by the Name column which is the user's textual username. #!/usr/bin/perl use strict; use lib /opt/rt4/lib; use lib /opt/rt4/local/lib; use RT; use RT::User; RT-LoadConfig; RT-Init; my $test_user = RT::User::Load('b...@buday-rd.hu'); printf \$test_user=, $test_user; my @to = $test_user-EmailAddress; for $a (0 .. $#to) { print $to[$a], \n; } Running this script with sudo makes it say [Mon Aug 13 11:16:47 2012] [crit]: Can't call method EmailAddress on an undefined value at ./email.pl line 13. (/opt/rt4/lib/RT.pm:341) Can't call method EmailAddress on an undefined value at ./email.pl line 13. The username I used in the place of m...@company.com is indeed a valid user name. What is the problem then? - Gergely Hello Gergely, you can only load a user by id or by E-mail address. The routine is LoadByEmail. Greetings, Wolfram https://rt-testsys-1/Developer/Perldoc/Body.html?n=RT::User#___top
Re: [rt-users] rt-users Digest, Vol 101, Issue 11
On 08/10/12 18:00, rt-users-requ...@lists.bestpractical.com wrote: Send rt-users mailing list submissions to rt-users@lists.bestpractical.com To subscribe or unsubscribe via the World Wide Web, visit http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users or, via email, send a message with subject or body 'help' to rt-users-requ...@lists.bestpractical.com You can reach the person managing the list at rt-users-ow...@lists.bestpractical.com When replying, please edit your Subject line so it is more specific than Re: Contents of rt-users digest... Today's Topics: 1. testing perl script in RT (Gergely Buday) 2. Re: testing perl script in RT (Paul Tomblin) 3. Re: testing perl script in RT (Thomas Sibley) 4. Re: testing perl script in RT (Thomas Sibley) 5. Re: testing perl script in RT (Paul Tomblin) 6. Re: testing perl script in RT (Thomas Sibley) 7. HTML emails and attachments (Josh Hopkins) 8. Re: rt-users Digest, Vol 101, Issue 9 (Wolfram Huettermann) 9. Email notification of updates (Mark Goodge) 10. Re: Email notification of updates (k...@rice.edu) 11. Re: Email notification of updates (Mark Goodge) 12. Re: Email notification of updates (k...@rice.edu) 13. Re: Email notification of updates (Mark Goodge) 14. incoming mail with attachement Permission Denied (Leon Berkers) -- Message: 1 Date: Thu, 9 Aug 2012 18:01:33 +0200 From: Gergely Budaygbu...@gmail.com To: rt-users@lists.bestpractical.com Subject: [rt-users] testing perl script in RT Message-ID: ca+3iozkqt_yopimrzc1vft1sdz7csmdjfvexjf4+imjkol+...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi there, how can I run a perl script through the RT environment so that I can use the database and all the modules, but see the compiler output on my faulty experiments? - Gergely -- Message: 2 Date: Thu, 9 Aug 2012 12:03:43 -0400 From: Paul Tomblinptomb...@xcski.com To: Gergely Budaygbu...@gmail.com Cc: rt-users@lists.bestpractical.com Subject: Re: [rt-users] testing perl script in RT Message-ID: cajcd8l8ahua53wnns+4rlyextc5yphh8svebrz7weogmz6x...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 On Thu, Aug 9, 2012 at 12:01 PM, Gergely Budaygbu...@gmail.com wrote: Hi there, how can I run a perl script through the RT environment so that I can use the database and all the modules, but see the compiler output on my faulty experiments? - Gergely use lib /opt/rt4/lib; use RT; That should be enough. Hello I use a perl template like this: #!/usr/bin/perl -w # notwendige Header Anfang use strict; use lib /opt/rt4/local/lib, /opt/rt4/lib; use RT; use RT::Interface::Web; # Load the config file use RT::Interface::CLI GetCurrentUser, loc, ; RT::LoadConfig(); # Connect to the database and get RT::SystemUser # loaded RT::Init(); ### Put here all other PERL modules you need or whereever you want. Greetings, Wolfram
Re: [rt-users] rt-users Digest, Vol 101, Issue 9
On 08/08/12 18:00, rt-users-requ...@lists.bestpractical.com wrote:-- Message: 4 Date: Wed, 8 Aug 2012 09:56:50 -0500 From: Aaron Zuercher aaron.techge...@gmail.com To: RT Users rt-users@lists.bestpractical.com Subject: [rt-users] queue disabled but still getting tickets Message-ID: CAAwtLFJQ656-2qr7xt8os=s_PF0tN+59C0P4cW6=7pjd5cn...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 I have disabled one of my queues to prevent new ticket submission but new tickets are still showing up. How to I stop this? I don't want to remove the queue because I want to reopen it in a month. I disabled it by going to TOOLS CONFIG QUEUES and unchecking enabled box. Thanks, Aaron -- next part -- An HTML attachment was scrubbed... URL: http://lists.bestpractical.com/pipermail/rt-users/attachments/20120808/dcaceb0d/attachment-0001.html -- rt-users mailing list rt-users@lists.bestpractical.com http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users End of rt-users Digest, Vol 101, Issue 9 Hello Aaron, how are the tickets being created? Otherwise I cannot help you, Greetings, Wolfram
[rt-users] Thanks for the invitation, I must refuse it
On 08/08/12 16:29, rt-users-requ...@lists.bestpractical.com wrote: -- Message: 3 Date: Tue, 7 Aug 2012 16:43:54 -0400 From: Kerik...@bestpractical.com To: rt-annou...@lists.bestpractical.com Subject: [rt-users] [rt-announce] RT Training in Atlanta, GA - October 23rd 24th, 2012 Message-ID:ab8e5121-9399-4db7-837f-91177d82a...@bestpractical.com Content-Type: text/plain; charset=us-ascii Best Practical Solutions provides unparalleled instruction in how to get the most out of RT. Our next and final training for 2012 will be held in Atlanta, GA October 23rd and 24th. As we like to keep class sizes relatively intimate, register soon or we may not be able to guarantee you a seat. This training will introduce you to the new features in RT4 as part of a comprehensive overview of RT. Whether you're an old hand at RT or a recent convert, you'll have a good understanding of all of RT's features and functionality by the end of the session. The first day starts off with a tour of RT's web interface and continues with a detailed exploration and explanation of RT's functionality, aimed at non-programmer RT administrators. We'll walk through setting up a common helpdesk configuration, from rights management, constructing workflows and notifications, and the basics of Lifecycles. The second day of training picks up with server-side RT administration and dives into what you need to safely customize and extend RT. We'll cover upgrading and deploying RT, database tuning, advanced Lifecycle configurations, writing tools with RT's API, building an extension, and demonstrate how to extensibly alter the web UI and internal functions. It goes without saying that you'll get the most out of training if you attend both days of the course, but we've designed the material so that you can step out after the first day with a dramatically improved understanding of how to use RT or show up on the second day and get quickly up to speed on how to make RT do your bidding. Pricing and Payment The cost of the class includes training materials, a continental breakfast and an afternoon snack. Please note that lunch will not be provided. Single Day - USD 995 Both Days - USD 1495 (25% savings) To Register If you'd like to pay with Visa, MasterCard or Discover, please visit Best Practical's online store at https://shop.bestpractical.com. Unfortunately we are unable to accept American Express or PayPal. If you'd prefer to pay with a purchase order, please email us a train...@bestpractical.com. Be sure to include: If you want to attend both days or a single day Full names and email addresses of attendees Please also contact us at train...@bestpractical.com for discounted pricing if you are from an academic institution or if you'd like to send more than 3 people. ___ rt-announce mailing list rt-annou...@lists.bestpractical.com http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-announce Hello Keri, thanks for that invitation. If I were able to, I would come, really, that is no joke. But unfortunately, my financial situation does not allow me to join that meeting. Perhaps Bjoern Schulz will be able to come, so he will tell me how it was like. So I must refuse, I am sorry, Wolfram
[rt-users] RT4 often displays cross site-forgery
Hello, if I want to create a ticket in RT4 via New Ticket in in General and press on the button, I always see a hint Possible cross-site forgery. This always occurs whenever I want to change or insert any data in the RT4 and click on the Submit button. What can I do? Greetings, Wolfram
[rt-users] Activating a plugin
Hi everybody, A short definition at first. Let localpath be my path where my RT is installed. I have got a plugin called RT-Extension-Dummy. It has only got one module Create.html in localpath/plugins/RT-Extension-Dummy/html/Ticket. The only difference compared to Create.html in localpath/share/html/Ticket is that you see this message in the code: /Elements/ListActions, actions = \@results This is just a dummy version of Create.html! Please ignore it! br / Everything else is the same. What did I do in order to activate this plugin? 1) I created a directory RT-Extension-Dummy in localpath/local/plugins/ 2) I created the following subdirectories: - lib - lib/RT - lib/RT/Extension - html - html/Ticket 3) I created Dummy.pm in lib/RT/Extension. Its content is: package RT::Extension::Dummy; use 5.008; use strict; use warnings; our $VERSION = 0.01; 1; # omitting pod sequences 4) I copied Create.html from localpath/share/html/Ticket.html to localpath/local/plugins/RT-Extension-Dummy and inserted the text I mentioned at the beginning. 5) I changed localpath/etc/RT_SiteConfig.pm and extended @plugins like this: Set (@plugins,(... , RT::Extension::Dummy)); 6) I restarted the httpd server. Having accomplished all of these steps, I still do not see the text This is just a dummy version of Create.html! Please ignore it! in Ticket/RtimCreate.html. What should I do in addition to activate RT-Extension-Dummy? By the way, I am root on my shell I work with. Thanks in advance, Wolfram Hüttermann
[rt-users] Getting the page source code from a generated MASON-File
Hello, I have got a MASON code from Ticket/foo.html with a mandatory URL parameter id, which is set to 11. You can see the page source code in your browser with View-Page Source. Nevertheless, I want to copy the generated code to /var/tmp/bar11.html; /var/tmp/ is a directory with sufficient conditions. If you use $m-comp like I will display in the code, it does not work. The code is: use IO::File; my $File = new IO::File/var/tmp/bar$id.html; Abort(Could not open file!) unless $File; $PageSource = $m-comp(/Ticket/foo.html, id = $id); print $File $PageSource; $File-close(); The file bar11.id for $id=11 will be created, as everybody can write into /var/tmp/, but it is empty. What can I do else, to put the page source code of a MASON-file into a temporary file? Or is it just impossible? In CGI it would simply be: system(foo.pl 'id=$id' /var/tmp/bar$id.html); Then you would see the page source code of foo.pl?id=11 in /var/tmp/bar11.pl. Greetings, Wolfram
[rt-users] convert Mason HTML into PDF
Hi RT-users, I have a Mason HTML file like foo.html?id=777 (URL parameter id is necessary!) and want to convert it to a pdf-file by clicking on a Submit-Button. This button can have the name Print. The code in the init-scope is supposed to look like that: %INIT # Code that unnecessary for the problem. if ($ARGS{Primt}) { use PrintModule; # print this file to bar.pdf } /%INIT Thanks in advance, Wolfram
[rt-users] Creating a ticket whose content is foo
Hello, I think this is a stupid question that I ask you old-timers in RT. I intend to create a ticket in the queue test and the content is foo in shell, not in MASON. Here is the code snippet: my $CurrentUser = GetCurrentUser(); use RT::Tickets; my $Ticket = RT::Ticket-new($CurrentUser); my %TicketInput = ( Subject = The new ticket today, Queue = testq-noc, # an existing one on your RT Owner = root, Requestor = max\@mustermann.de, # an existing one on your RT Content = foo, Status = new, ); $Ticket-Create(%TicketInput); The ticket will be created, but its content remains empty if you look in the module Ticket/Display.html. Nevertheless, I want to create a ticket whose content is supposed to be foo. I cannot use the function CreateTicket, as it only works on RT-MASON, but not on bash. Greetings, Wolfram Hüttermann
[rt-users] When are new users created in RT?
Hello, I created a tool in which I can detect and eliminate duplicate users in RT, and now I am writing a documentation. I already know that i can create a new user in Admin/Users/modify.html?id=new and maybe if I add a watcher of a ticket. My question is: when do I create new users in general except these given possibilities? Greetings, Wolfram
[rt-users] Commenting PERL code in pm and MASON modules
Hello, I spent a week commenting PERL code in MASON modules and pm files. Having read some MASON modules, I was quite astonished that there was not almost any comment except th beginning one? So do you comment your MASON modules? Or do you put everything in a manual which could be an HTML file? I am looking forward to reading your replies. Greetings, Wolfram
[rt-users] My problem with the user custom fields
Hi again, I wrote two scripts in order to describe my problem concerning user custom fields. I can say that everything works with ticket custom fields. So, here is script #1 #!/usr/bin/perl -w use strict; use lib /opt/rt3/local/lib, /opt/rt3/lib; use RT; use Getopt::Long; # Load the config file RT::LoadConfig(); # Connect to the database and get RT::SystemUser # loaded RT::Init(); use RT::Interface::CLI GetCurrentUser, loc; my $CurrentUser = GetCurrentUser(); use RT::Tickets; use RT::Template; my $TId; # The costumfield #96 is a ticket customfield whose name is # 'RTIM_App_Name' my ($RTIMAppId, $RTIMAppName) = (96, RTIM_App_Name); # The strings are the values that custom field will contain my ($String1, $String2) = (UNIX 2010, UNIX 2015); my $Ticket = RT::Ticket-new($CurrentUser); # The number has to be an id of an existing ticket! $Ticket-Load(318616); # Let us define two Ticket collections my $Tickets1 = new RT::Tickets($CurrentUser); my $Tickets2 = new RT::Tickets($CurrentUser); # The customfield #96 of the tickent #318616 is being changed to 'UNIX 2010'. $Ticket-AddCustomFieldValue(Field = $RTIMAppName, Value = $String1, RecordTransaction = 0); $Tickets1-LimitCustomField(CUSTOMFIELD = $RTIMAppId, OPERATOR = =, VALUE = $String1); #Ticket #318616 occurs print Tickets with $RTIMAppName = \'$String1\'\n\n; while (my $Entry = $Tickets1-Next()) { print join(\t, ($Entry-Id, $Entry-Created, $Entry-Subject)),\n; } # The customfield #96 of the tickent #318616 is being changed to 'UNIX 2015' . $Ticket-AddCustomFieldValue(Field = $RTIMAppName, Value = $String2, RecordTransaction = 0); # $Ticket2 refers to the updated collection $Tickets2-LimitCustomField(CUSTOMFIELD = $RTIMAppId, OPERATOR = =, VALUE = $String1); # Ticket #318616 does not occur anymore. print Tickets with $RTIMAppName = \'$String1\'\n\n; while (my $Entry = $Tickets2-Next()) { print join(\t, ($Entry-Id, $Entry-Created, $Entry-Subject)),\n; } and here is script #2 #!/usr/bin/perl -w # notwendige Header Anfang use strict; use lib /opt/rt3/RTIM/lib, /opt/rt3/lib; use RT; # Load the config file RT::LoadConfig(); # Connect to the database and get RT::SystemUser # loaded RT::Init(); use RT::Interface::CLI GetCurrentUser, loc; # notwendige Header Ende use RT::Users; use UserCF; my $CurrentUser = GetCurrentUser(); my $Users1 = new RT::Users($CurrentUser); my $Users2 = new RT::Users($CurrentUser); my $UserObject = RT::User-new($CurrentUser); my ($String1, $String2) = (ABCDEFGH, RSTUVWXYZ); # The costumfield #126 is a user customfield whose name is # 'MergeStatus' my $MStatusId = 126; my $MStatusName = MergeStatus; # The number has to be an id of an existing user! $UserObject-Load(4380); # The customfield #126 of the user #4380 is being changed to 'ABCDEFGHI'. $UserObject-AddCustomFieldValue(Field = $MStatusName, Value = $String1,RecordTransaction = 0); $Users1-LimitCustomField(CUSTOMFIELD = $MStatusId, OPERATOR = =, VALUE = $String1 ); #User #4380 occurs print Users with the Status $String1\n; while (my $UC = $Users1-Next()) { my $MStatusValue; my $CFValues = $UC-CustomFieldValues($MStatusId); while (my $CFValue = $CFValues-Next) { $MStatusValue = $CFValue-Content; } print join(\t, ($UC-Id, $UC-Name, $UC-RealName, $MStatusValue )), \n; } print \n\n\n; # The customfield #126 of the user #4380 is being changed to 'RSTUVWXYZ'. $UserObject-AddCustomFieldValue(Field = $MStatusName, Value = $String2,RecordTransaction = 0); # $User2 refers to the updated collection $Users2-LimitCustomField(CUSTOMFIELD = $MStatusId, OPERATOR = =, VALUE = $String1 ); #User #4380 still occurs, although he should not occur anymore! print Users with the Status $String1\n; while (my $UC = $Users1-Next()) { my $MStatusValue; my $CFValues = $UC-CustomFieldValues($MStatusId); while (my $CFValue = $CFValues-Next) { $MStatusValue = $CFValue-Content; } print join(\t, ($UC-Id, $UC-Name, $UC-RealName, $MStatusValue )), \n; } I hope you eventually know what I meant. I apologise any misunderstandings. Greetings, Wolfram Huettermann
[rt-users] ProcessCustomfieldUpdates in a perl shell script
Hello, I have got one very short question. Which module should I use and which paths should I shift in @INC, so that I can use the function ProcessCustomFieldUpdates in a perl shell script, an executable .pl from the shell? I have not received any information by the internet, yet. Thanks in advance, Wolfram
[rt-users] Problems with user custom fields still unaswered #1
Hello, It is sorry that nobody has answered this problem, yet. I will describe it again: I habe a use with the real name Max Mustermann with the id #13159. He possesses a user custom field with the id #17 and the name test. It is a text field and its value is foo. It is supposed to be empty for all other users. One day, I change that costumfield of that user to bar and I have a collection of Users called $Users which I intend to limit that way: $Users-LimitCustomField( CUSTOMFIELD = 17, OPERATOR = =, VALUE = foo); The very trouble is that this collection still enlists Max Mustermann as foo is a former customfield value of the customfield #17. This is not very helpful. Nevertheless, I want to enlist all users whose CURRENT value of customfield #17 is foo. Is it possible? Or is it impossible? Thanks in advance, Wolfram
[rt-users] Problems with user Custom fields
Hello, I have a big problem with user custom fields. I will describe it that way: I habe a use with the real name Max Mustermann with the id #13159. He possesses a user custom field with the id #17 and the name test. It is a text field and its value is foo. It is supposed to be empty for all other users. One day, I change that costumfield of that user to bar and I have a collection of Users called $Users which I intend to limit that way: $Users-LimitCustomField( CUSTOMFIELD = 17, OPERATOR = =, VALUE = foo); The very trouble is that this collection still enlists Max Mustermann as foo is a former customfield value of the customfield #17. This is not very helpful. Nevertheless, I want to enlist all users whose CURRENT value of customfield #17 is foo. Is it possible? Or is it impossible? Thanks in advance, Wolfram
[rt-users] Thanks for your help with the user CF
Hi Emannuel, thank you! It works very well. It is sufficient to write: q{, 'CF.{Test}/TITLE:This is a test'} Greetungs, Wolfram
[rt-users] Display user custom fields in user list
Hi, I have a user list with the entries id, name, real name and e-mail address. I have created a user custom field hobbies and I want to display it in that list as an additional column. How is it possible? What should I do? Thanks in advance. Wolfram Huettermann
[rt-users] Problems with SQL-time functions
Hello, I was given the task to filter all the tickets inside or outside fixed business hours in a specified date range. I will display you table to demonstrate what I mean: weekday office opensoffice closes Monday-Thursday 8:00:0016:00:00 Friday 8:00:0015:30:00 In usual SQL, one would filter weekday by weekday and exclude the time outside or inside working hours. If you only want to enlist the Tickets inside business hours, you can use the TIME and WEEKDAY functions, the SQL statement would look like that: Select id, Created, Subject from Tickets where WEEKDAY(Created) not in (0,6) and ((WEEKDAY(Created) in(1, 2, 3, 4) and TIME(Created) '08:00:00' and TIME(Created) '16:00:00') or (WEEKDAY(Created)=5 and TIME(Created) '08:00:00' and TIME(Created) '15:30:00')) If you put the statement after the where-clause into the method FormSQL of the class RT::Ticket, you will not get the right results, but /all/ tickets. I do not know why that method does not work. Does anybody have any hints? Or is it just impossible to do so? Greetings, Wolfram RT Training in Washington DC, USA on Oct 25 26 2010 Last one this year -- Learn how to get the most out of RT!
[rt-users] Problems in administrating user custom field rights
Hello, I have got a group G with the Users U1 and U2 and a user custom field CF. That group is supposed to modify and see that custom field. Nevertheless, if I login with U1 (not root!) , I can neither see nor modify CF unless every privileged user is allowed to see and modify it. You can test that, if you copy Admin/Users/Modify.html in a local directory which is not in local/html/Admin/ Is there any way in which I can only allow users of G to modify and see CF? Greetings, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] I am not content with the name StealTicket
Hello, everybody using RT properly knows the right StealTicket in order to take a ticket over. As a believing Christian, I am not content with that name as I do not want to steal anything. It is better to name that right TakeTicketOver, so it is granted that the user takes a ticket over with permission of the user. By the RT should create a new right called ConfiscateTicket, that the means that user can confiscate a ticket. Such a right is very useful if the ticket contains racial or pornographic content. Greetings, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Limit users by a non-empty customfield
Kevin Falcone wrote: On Mon, Jun 28, 2010 at 12:05:13PM +0200, Wolfram Huettermann wrote: Hello, I have got a user customfield called MyComment and I want to filter all users where this customfield is not empty. In my case, it is of freefrom type. The function LimitToCustomField does not work properly if I use $User-LimiToCostumField(FIELD = MyComment, OPERATOR = !=, VALUE = ); I assume you meant LimitCustomField, and that doesn't take a FIELD argument -kevin Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com Yes, you are totally right. But even this code: $User-LimiToCostumField(CUSTOMFIELD = MyComment, OPERATOR = !=, VALUE = ); does not work. Greetings, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Limit users by a non-empty customfield
Hello, I have got a user customfield called MyComment and I want to filter all users where this customfield is not empty. In my case, it is of freefrom type. The function LimitToCustomField does not work properly if I use $User-LimiToCostumField(FIELD = MyComment, OPERATOR = !=, VALUE = ); Has anybody got a hint? Greetings, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Thank you for your advice!
Kevin Falcone wrote: On Thu, Jun 24, 2010 at 03:45:23PM +0200, Wolfram Huettermann wrote: Hello, I have got a queue in whose tickets I display some Custom fields (CFs). These CFs should be displayed in a special order determined by their id's. That means: if I fix 21 104 102, then CF #21 is being displayed first, then CF #104 and then CF #102. Surely all these CFs belong to the same queue. How is that possible without manipulating the name or description of the CF? Configuration - Queues - Queue Name - Ticket Custom Fields It helps if you have 3.8.8, Ruslan did a lot of work on custom field sorting in that release. -kevin Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com Hello Kevin, thank you for 1) reading my request properly. 2) your advice! English is not my native tongue, so that it is useful for me to write a request down before I type it. Anyway, I like RT very much. Greetings, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Customfields in a queue should be displayed in a special order
Hello, I have got a queue in whose tickets I display some Custom fields (CFs). These CFs should be displayed in a special order determined by their id's. That means: if I fix 21 104 102, then CF #21 is being displayed first, then CF #104 and then CF #102. Surely all these CFs belong to the same queue. How is that possible without manipulating the name or description of the CF? Thanks in advance, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Getting customfield value for a ticket
Johan Sjöberg wrote: Hi. We have a custom field named ”Customer” that we set for our tickets. I am trying to modify this report to summarize time worked per customer during the given time period: http://wiki.bestpractical.com/view/TimeWorkedReport The problem I have is to get the custom field value for a ticket. I have a Ticket “Object” that is created by my $t = new RT::Ticket($session{'CurrentUser'}); $t-Load($tr-ObjectId); After that I want to get the Custom Field value for this ticket. I can see the data in the ObjectCustomFieldValues table, but I do not know how to get the information I want. I have the ticket id in $t-id and the CustomField id is 19. I have tried using the different functions available in the RT perl modules, but have been unable to get it right. I know very little perl, so I have been working at a trial and error basis. Do you have any tips for me on how to get it to work? Best Regards, Johan Sjöberg Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com Hello Johann, Use $t-Content if this custom field only stores one value. Greetings, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Hashes in Collectionlist for Users
Hello out there, in Admin/Users/index.html (surely on the local-path), in the %init%-part I implemented a hash which looks like that: my %NumHash = (21 = foo, 23 = bar, 25 = entry, 29 = exit); It is for sure that $NumHash{21} displays foo, for instance. I want to get a list with the following entries: # RealNameNumHash 13 Obama, Barack 21 Reagan, Ronald foo 23 Clinton, Bill bar 25 Nixon, Richard entry 29 Washington, George exit I do not think that $NumHash{__id__} works if I implement it in the format string of my collection list. What can I do else? Thanks in advance. Wolfram Hüttermann Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Ticket/Display.html is just not controllable
Kevin Falcone wrote: On Thu, May 27, 2010 at 09:12:55AM +0200, Wolfram Huettermann wrote: Kevin Falcone wrote: On Wed, May 26, 2010 at 09:46:42AM +0200, Wolfram Huettermann wrote: I am dealing with Ticket/Display.html. What I found out: - there is NO change in the page source the when you change the Mason-block - I cannot get any information of the callback-functions used. My task was to limit the size of the layers in which you can see the metadata and the history of the ticket. It is more user-friendly to scroll them. Has anybody an idea how it could work anyway? Or is it just impossible? Without knowing what you did, it is impossible to know what is wrong. However, it sounds like Christian Loos has already implemented a similar module http://github.com/cloos/rt-extension-briefhistory I wanted to change the module Ticket/Display.html in the HTML-block. But its appearance and its source code remained the same, even after I had cut this block. It seems that the %init%-block creates the module and overlays the HTML-code. I even haven't got any information of the callback-functions in that block. Here is the init-block of Ticket/Display.html. You've not actually said what callbacks you created or how you tried to overlay Display.html by copying it to local/ or explained what you want to accomplish, so I'm afraid I can't really guess at what you're trying to do. Have you read the documentation on the wiki about customizing RT? -kevin Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com I know the bug, plugins are just overlaying the source code. That is very bad :( Greetings and thanks for your advice, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Ticket/Display.html is just not controllable
Kevin Falcone wrote: On Wed, May 26, 2010 at 09:46:42AM +0200, Wolfram Huettermann wrote: Hello, I am dealing with Ticket/Display.html. What I found out: - there is NO change in the page source the when you change the Mason-block - I cannot get any information of the callback-functions used. My task was to limit the size of the layers in which you can see the metadata and the history of the ticket. It is more user-friendly to scroll them. Has anybody an idea how it could work anyway? Or is it just impossible? Without knowing what you did, it is impossible to know what is wrong. However, it sounds like Christian Loos has already implemented a similar module http://github.com/cloos/rt-extension-briefhistory -kevin Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com Hi Kevin, I wanted to change the module Ticket/Display.html in the HTML-block. But its appearance and its source code remained the same, even after I had cut this block. It seems that the %init%-block creates the module and overlays the HTML-code. I even haven't got any information of the callback-functions in that block. Here is the init-block of Ticket/Display.html. %INIT $m-callback( TicketObj = $TicketObj, ARGSRef = \%ARGS, CallbackName = 'Initial' ); my (@Actions, $Tickets); unless ($id || $TicketObj) { Abort('No ticket specified'); } if ($ARGS{'id'} eq 'new') { # {{{ Create a new ticket my $Queue = new RT::Queue( $session{'CurrentUser'} ); $Queue-Load($ARGS{'Queue'}); unless ( $Queue-id ) { Abort('Queue not found'); } unless ( $Queue-CurrentUserHasRight('CreateTicket') ) { Abort('You have no permission to create tickets in that queue.'); } ($TicketObj, @Actions) = CreateTicket( Attachments = delete $session{'Attachments'}, %ARGS, ); unless ( $TicketObj-CurrentUserHasRight('ShowTicket') ) { Abort(No permission to view newly created ticket #.$TicketObj-id..); } # }}} } else { $TicketObj ||= LoadTicket($ARGS{'id'}); $m-callback( CallbackName = 'BeforeProcessArguments', TicketObj = $TicketObj, Tickets = $Tickets, ActionsRef = \...@actions, ARGSRef = \%ARGS ); if ( defined $ARGS{'Action'} ) { if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) { my $action = $1; my ($res, $msg) = $TicketObj-$action(); push(@Actions, $msg); } } $m-callback(CallbackName = 'ProcessArguments', Ticket = $TicketObj, ARGSRef = \%ARGS, Actions = \...@actions); $ARGS{UpdateAttachments} = $session{'Attachments'}; push @Actions, ProcessUpdateMessage( ARGSRef = \%ARGS, Actions = \...@actions, TicketObj = $TicketObj, ); delete $session{'Attachments'}; #Process status updates push @Actions, ProcessTicketWatchers(ARGSRef = \%ARGS, TicketObj = $TicketObj ); push @Actions, ProcessTicketBasics( ARGSRef = \%ARGS, TicketObj = $TicketObj ); push @Actions, ProcessTicketLinks( ARGSRef = \%ARGS, TicketObj = $TicketObj ); push @Actions, ProcessTicketDates( ARGSRef = \%ARGS, TicketObj = $TicketObj ); push @Actions, ProcessObjectCustomFieldUpdates(ARGSRef = \%ARGS, TicketObj = $TicketObj ); # XXX: we shouldn't block actions here if user has no right to see the ticket, # but we should allow him to see actions he has done unless ($TicketObj-CurrentUserHasRight('ShowTicket')) { Abort(No permission to view ticket); } if ( $ARGS{'MarkAsSeen'} ) { $TicketObj-SetAttribute( Name = 'User-'. $TicketObj-CurrentUser-id .'-SeenUpTo', Content = $TicketObj-LastUpdated, ); push @Actions, loc('Marked all messages as seen'); } } $m-callback( CallbackName = 'BeforeDisplay', TicketObj = \$TicketObj, Tickets = \$Tickets, Actions = \...@actions, ARGSRef = \%ARGS, ); # This code does automatic redirection if any updates happen. if (@Actions) { # We've done something, so we need to clear the decks to avoid # resubmission on refresh. # But we need to store Actions somewhere too, so we don't lose them. my $key = Digest::MD5::md5_hex( rand(1024) ); push @{ $session{Actions}-{$key} ||= [] }, @Actions; $session{'i'}++; RT::Interface::Web::Redirect( RT-Config-Get('WebURL') . Ticket/Display.html?id= . $TicketObj-id . results= . $key ); } my $attachments = $m-comp('Elements/FindAttachments', Ticket = $TicketObj, Tickets = $Tickets); my $attachment_content = $m-comp('Elements/LoadTextAttachments', Ticket = $TicketObj); my %link_rel; if (defined $session{'tickets'} and ($ARGS{'Query'} or $session{'CurrentSearchHash'}-{'Query'})) { my $item_map = $session{'tickets'}-ItemMap; $link_rel{first} = Ticket/Display.html?id= . $item_map-{first
[rt-users] Ticket/Display.html is just not controllable
Hello, I am dealing with Ticket/Display.html. What I found out: - there is NO change in the page source the when you change the Mason-block - I cannot get any information of the callback-functions used. My task was to limit the size of the layers in which you can see the metadata and the history of the ticket. It is more user-friendly to scroll them. Has anybody an idea how it could work anyway? Or is it just impossible? Thanks in advance, Wolfram Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com