Re: [rt-users] ruby -> REST
> no value sent for required parameter 'changes' > Stack: > [/opt/rt38/share/html/REST/1.0/dhandler:285] > [/opt/rt38/share/html/REST/1.0/autohandler:54] > [/opt/rt38/share/html/autohandler:311] I seem to have figured this out. You can use application/x-www-form-urlencoded, but you have to create a single form field named "content", and it must contain the entire form in RFC822 format. I didn't really see that documented anywhere I was looking, so perhaps the documentation is somewhat lacking. For example, where I had this: req.set_form_data( { "Action" => "comment", "Text" => "This is some text" } ) I changed to this: req.set_form_data( { "content" => "Action: comment\nText: This is some text" }) and it works as desired. For the "Text" parameter in the content, if you want to add a multi-line comment it seems you have to have white-space at the beginning of continuation lines, otherwise the RT "form parser" in the REST interface thinks its a syntax error; any line with a character in the first column is expected to be a field name within the form. It also seems bizarre to me to implement the interface that way. Basically its like making a web page with a single text area named "content" and then requiring formatting within that one field. Why not have the REST interface have discrete fields? Coding to it would be certainly be cleaner. Maybe for /REST/2.0/ ? :) -- -- Tom Lahti BIT Statement LLC (425)251-0833 x 117 http://www.bitstatement.net/ -- ___ 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] Set a ticket custom field based on a User Custom field scrip action
Here's the scenario: 1) A User has a custom field called Billable with two choices, yes, and no. 2) User creates ticket 3) Scrip checks Billable and sets ticket billable if user is billable I'm having a bit of trouble figuring out how I can access the custom field belonging to the user however, anyone have thoughts on this? -Joel ___ 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] ruby -> REST
Tom Lahti wrote: > I am working on some code in ruby that accesses the REST interface. I've re-written the whole thing using the rest_client ruby gem, and essentially the same results, but I get more info out of what's going on: # ./resttest2.rb - Request headers {"User-Agent"=>"Mozilla/5.0 fake 0.1", "Content-Type"=>"application/x-www-form-urlencoded", :content_type=>"application/x-www-form-urlencoded", "Cookie"=>"RT_SID_.net.443=[a_hex_session_id]"} - Request payload "Ticket=846&Text=This%20is%20yet%20another%20test." = - Response headers {:server=> "Apache/[snip] mod_perl/2.0.3 Perl/v5.8.8", :date=>"Mon, 16 Feb 2009 23:24:29 GMT", :transfer_encoding=>"chunked", :content_type=>"text/plain; charset=utf-8"} - Response Payload no value sent for required parameter 'changes' Stack: [/opt/rt38/share/html/REST/1.0/dhandler:285] [/opt/rt38/share/html/REST/1.0/autohandler:54] [/opt/rt38/share/html/autohandler:311] Is it permissible to POST to the REST interface using content type application/x-www-form-urlencoded? It would seem that the RT CLI does something else but its difficult for me to figure out what. Should I be asking about this on rt-devel instead? -- -- Tom Lahti BIT Statement LLC (425)251-0833 x 117 http://www.bitstatement.net/ -- ___ 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] ruby -> REST
I am working on some code in ruby that accesses the REST interface. I am running RT 3.8.2. I am able to login, save cookies, and retrieve tickets and history without problems. My problem starts when I try to use REST to add a comment/correspondence to a ticket. The following code: url = "#{REST}ticket/846/comment" req = Net::HTTP::Post.new(url) req.add_field 'User-Agent',UA req.add_field 'Cookie',cookie req.set_form_data( { "Action" => "comment", "Text" => "This is some text" } ) response,data = http.request(req) puts response.code + " " + response.message puts "Data: " puts data produces this output: 200 OK Data: no value sent for required parameter 'changes' Stack: [/opt/rt38/share/html/REST/1.0/dhandler:285] [/opt/rt38/share/html/REST/1.0/autohandler:54] [/opt/rt38/share/html/autohandler:311] I've looked at /opt/rt38/share/html/REST/1.0/dhandler line 285 and there is a method call $m->comp with no mention of a parameter named 'changes', which is quite possibly the problem. Later in the file there is another $m->comp call that has a 'changes' parameter. I suspect this is a bug in share/html/REST/1.0/dhandler. But what I don't understand is why the RT command line tool can do it and I can't. Anyone else run into this? -- -- Tom Lahti BIT Statement LLC (425)251-0833 x 117 http://www.bitstatement.net/ -- ___ 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] Modifying Quick Search in RT 3.8.1
Chris Nelson wrote: > OK. I was able to solve the last problem here as well! > > I went to *rt3/share/html/Elements/QueueSummary* and added *OR Status > = 'staged'* to the following line: > % my $all_q = $queue_cond . "(Status = 'open' OR Status = 'new' OR > Status = 'stalled' OR Status = 'staged')"; > > I imagine this isn't the best way to do this as it will be overwritten > if we do any upgrades. Is there a config file I can put this in? I'd posted a patch for this that was accepted (not sure if it is 3.8.2, but could be) so all you should have to change us QuickSearch -- the line above becomes: my $all_q = $queue_cond . "(" . join(" OR ", map { $_->{cond} } @$conditions) . ")"; Then, all you need to do is add to the conditions list in QuickSearch. Regards, Mark -- Mark D. Nagel, CCIE #3177 Principal Consultant, Willing Minds LLC (http://www.willingminds.com) cell: 949-279-5817, desk: 714-495-4001, fax: 949-623-9854 *** Please send support requests to supp...@willingminds.com! *** ___ 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] Modifying Data Label in RT 3.8.1
On Mon, Feb 16, 2009 at 15:04, Chris Nelson wrote: > to the bottom of rt3/lib/RT/I18N/en.po, restarted apache, and it worked like > a champ! Is there a way to get RT to use the en_qaa.po file so that upgrades > won't destroy those changes? Yes, you have to set your language to that dialect in user preferences. You should also be able to set the system default language to that dialect. -- 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 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Modifying Quick Search in RT 3.8.1
OK. I was able to solve the last problem here as well! I went to *rt3/share/html/Elements/QueueSummary* and added *OR Status = 'staged'* to the following line: % my $all_q = $queue_cond . "(Status = 'open' OR Status = 'new' OR Status = 'stalled' OR Status = 'staged')"; I imagine this isn't the best way to do this as it will be overwritten if we do any upgrades. Is there a config file I can put this in? Thanks so very much for all the help! -Chris % my $all_q = $queue_cond . "(Status = 'open' OR Status = 'new' OR Status = 'stalled' OR Status = 'stalled')"; On Fri, Feb 13, 2009 at 1:16 PM, Chris Nelson wrote: > Sweet. I was able to figure out that page no problem and after a quick > restart of Apache2, staged now shows in the quick search. > > Interestingly, I had already added the line: > Set(@ActiveStatus, qw(new open stalled staged)); > to RT_SiteConfig.pm and it still isn't showing up in those queries... > > Any other thoughts on solving the second issue? > -Chris > > > On Fri, Feb 13, 2009 at 1:04 PM, Jerrad Pierce < > jpie...@cambridgeenergyalliance.org> wrote: > >> > We want to add a column to the Quick Search on the RT at a Glance screen >> for >> > Staged. So, across the top of Quick Search you would see Queue New Open >> > Stalled Staged. I have hunted and hunted and can't figure out how to do >> > that. Is it possible? >> You have to be root to edit the global queries for widgets on the front >> page, >> but Quicksearch appears to be special, and apparently requires tweaking >> a local copy of share/html/Elements/Quicksearch; it's a simple file >> though. >> >> > Once you click on a queue, we want to ensure that tickets with a status >> of >> > staged show up in the list. >> Add Staged to @ActiveStatus in RT_SiteConfig.pm >> (copying from RT_Config.pm as necessary) >> >> -- >> 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 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Modifying Data Label in RT 3.8.1
Ok. I added the lines: msgid "Time Estimated" msgstr "Billable Time" to the bottom of *rt3/lib/RT/I18N/en.po*, restarted apache, and it worked like a champ! Is there a way to get RT to use the en_qaa.po file so that upgrades won't destroy those changes? Thanks so very much for the help! -Chris On Mon, Feb 16, 2009 at 2:10 PM, Chris Nelson wrote: > Thanks for all the help! I feel like you've really gone above and beyond > helping me sort this out! > > Unfortunately, it's still not working (and I'm 95% sure it's all me). > > Here's what I've done: > > Created a file called *rt3/lib/RT/I18N/en_qaa.po*. That file contains the > following: > #: added 2/16/2009 by CN to modify a data label. According to > #: instructions at http://wiki.bestpractical.com/view/CustomizeLabel > > msgid "Time Estimated" > msgstr "Billable Time" > > I then tried SIGHUP and HUP at the command line and just got *-bash: HUP: > command not found* (which I think is just a function of me > misunderstanding what you're telling me to do to gracefully restart the > server). So, I went with the old standby of *sudo /etc/init.d/apache2 > restart* and then removed all the cookies in my browser associated with > the Web site. When I started a new session, logged back into the Web site, I > still see *Time Estimated* when I go to edit a ticket. > > Thanks so much for sticking with me on this problem! > -Chris > > > On Fri, Feb 13, 2009 at 2:47 PM, Jerrad Pierce < > jpie...@cambridgeenergyalliance.org> wrote: > >> On Fri, Feb 13, 2009 at 14:32, Jerrad Pierce >> wrote: >> > On Fri, Feb 13, 2009 at 14:12, Chris Nelson >> wrote: >> >> It REALLY didn't like that. I wasn't able to start apache with that >> file. I >> >> had to delete the file to get it to start again. >> > Any information from error logs to report? Did you not copy I18N/ >> i_default.pm >> > to local too? >> > >> > I did, and works fine for me. >> Actually, to clarify, see: >> http://wiki.bestpractical.com/view/CustomizeLabel >> >> This may not be the sanctioned way/what Best Practical had in mind, >> but it seems close, and it works. Others are welcome to make corrections. >> >> -- >> 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 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Modifying Data Label in RT 3.8.1
Thanks for all the help! I feel like you've really gone above and beyond helping me sort this out! Unfortunately, it's still not working (and I'm 95% sure it's all me). Here's what I've done: Created a file called *rt3/lib/RT/I18N/en_qaa.po*. That file contains the following: #: added 2/16/2009 by CN to modify a data label. According to #: instructions at http://wiki.bestpractical.com/view/CustomizeLabel msgid "Time Estimated" msgstr "Billable Time" I then tried SIGHUP and HUP at the command line and just got *-bash: HUP: command not found* (which I think is just a function of me misunderstanding what you're telling me to do to gracefully restart the server). So, I went with the old standby of *sudo /etc/init.d/apache2 restart* and then removed all the cookies in my browser associated with the Web site. When I started a new session, logged back into the Web site, I still see *Time Estimated*when I go to edit a ticket. Thanks so much for sticking with me on this problem! -Chris On Fri, Feb 13, 2009 at 2:47 PM, Jerrad Pierce < jpie...@cambridgeenergyalliance.org> wrote: > On Fri, Feb 13, 2009 at 14:32, Jerrad Pierce > wrote: > > On Fri, Feb 13, 2009 at 14:12, Chris Nelson wrote: > >> It REALLY didn't like that. I wasn't able to start apache with that > file. I > >> had to delete the file to get it to start again. > > Any information from error logs to report? Did you not copy I18N/ > i_default.pm > > to local too? > > > > I did, and works fine for me. > Actually, to clarify, see: > http://wiki.bestpractical.com/view/CustomizeLabel > > This may not be the sanctioned way/what Best Practical had in mind, > but it seems close, and it works. Others are welcome to make corrections. > > -- > 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 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] CanonicalizeUserInfo in Email.pm - "Name in use"
On Thu, Jan 29, 2009 at 05:41:57PM +0100, Lars Kristian Klykken wrote: > Users are properly authenticated on the web interface, and they also > have no problem sending mail to RT, as long as they're using the email > address defined in RT at createtime (or modified manually in the > preferences), but as soon as they try to send an email to RT with one of > the LDAP defined aliases (specified as 'mail' objects) it will be > bounced with the reason 'Name in use'. I have now solved this issue by rewriting the aliases through an LDAP lookup on the MTA on the RT server. In this case, Postfix. main.cf: local_header_rewrite_clients = hash:/etc/postfix/smtpservers sender_canonical_maps = ldap:/etc/postfix/canonical-ldap.cf canonical-ldap.cf: server_host = ldap.example.com version = 3 search_base = o=example.com query_filter = mailalternateaddress=%s result_attribute = mail domains = example.com .../Bosse -- Lars Kristian (Bosse) Klykken, Senior Engineer Tel. +47 22963068 Server Operations / IT Division Fax. +47 22696355 Norwegian Meteorological Institute, Oslohttp://www.met.no ___ 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] is it possible to demerge a ticket?
On Mon, Feb 16, 2009 at 12:20:38PM -0500, Mathieu Longtin wrote: > Hi, > > somebody here merged a ticket with another one, but shouldn't have. Is it > possible to split the tickets again? > It's a bit difficult but possible in the DB. See the FAQ entry on this at http://wiki.bestpractical.com/. ___ 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] is it possible to demerge a ticket?
Hi, somebody here merged a ticket with another one, but shouldn't have. Is it possible to split the tickets again? Thanks -- Mathieu Longtin 1-514-803-8977 ___ 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] Reply to a ticket for a support user
ReplyToTicket right and pay attention to NotifyActor config option. Sure you'll need scrip notify requestors on correspond with template xxx. On Mon, Feb 16, 2009 at 1:45 PM, Jon Westholm wrote: > Hi all, > > Total freshmen to RT and setting up my first instance that should run two > queues. Currently I have configured two users as support persons. RT sends > the new ticket mail and also the case closed mail without any problems but; > > - As one of the support persons I cannot send a reply mail to the > requestor. It just becomes a comment in the ticket. > > - As root this works just fine. > > > > I have added both of my users to the Global Super User feature and now I am > running out of ways to configure all the permissions on queue, group, user, > privileged and non privilege uses, etc > > > > What am I missing. I want the support person to communicate with reply to > the requestor. > > Cheers! > > > > // jon > > > > Cut and paste of my system conf; > > Loaded perl modules > > Perl v5.8.8 under linux > Apache2::Const v2.02; > Apache2::Log v2.02; > Apache2::RequestIO v2.02; > Apache2::RequestRec v2.02; > Apache2::RequestUtil v2.02; > Apache2::Response v2.02; > Apache2::ServerUtil v2.02; > Apache2::Status v4.00; > Apache::Session v1.88; > Apache::Session::Generate::MD5 v2.12; > Apache::Session::Lock::MySQL v1.01; > Apache::Session::MySQL v1.01; > Apache::Session::Serialize::Storable v1.01; > Apache::Session::Store::DBI v1.02; > Apache::Session::Store::MySQL v1.04; > APR v0.009000; > APR::Pool v0.009000; > APR::Table v0.009000; > AutoLoader v5.60; > base v2.07; > bytes v1.02; > Cache::Simple::TimedExpiry v0.27; > capitalization v0.03; > Carp v1.04; > CGI v3.42; > CGI::Cookie v1.29; > CGI::Util v1.5_01; > Class::Accessor v0.31; > Class::Accessor::Fast v0.31; > Class::Container v0.12; > Class::Data::Inheritable v0.08; > Class::Inspector v1.23; > Class::ReturnValue v0.55; > Clone v0.30; > constant v1.05; > CSS::Squish v0.07; > Cwd v3.29; > Data::Dumper v2.121_08; > Date::Format v2.22; > Date::Parse v2.27; > DBD::mysql v3.0008; > DBI v1.53; > DBIx::SearchBuilder v1.54; > DBIx::SearchBuilder::Union v0; > DBIx::SearchBuilder::Unique v0.01; > Devel::StackTrace v1.20; > Devel::StackTraceFrame v1.20; > Devel::Symdump v2.08; > Digest::base v1.00; > Digest::MD5 v2.36; > DynaLoader v1.04; > Email::Address v1.889; > Encode v2.26; > Encode::Alias v2.10; > Encode::Config v2.05; > Encode::Encoding v2.05; > Errno v1.0901; > Exception::Class v1.26; > Exception::Class::Base v1.2; > Exporter v5.58; > Exporter::Heavy v5.58; > Fcntl v1.05; > File::Basename v2.74; > File::Glob v1.05; > File::Path v1.08; > File::ShareDir v1.00; > File::Spec v3.29; > File::Spec::Functions v3.29; > File::Spec::Unix v3.29; > File::Temp v0.21; > FileHandle v2.01; > GD v2.34; > GD::Image v2.27; > GraphViz v2.04; > HTML::Element v3.23; > HTML::Entities v3.57; > HTML::Formatter v2.04; > HTML::FormatText v2.04; > HTML::Mason v1.40; > HTML::Mason::ApacheHandler v1.69; > HTML::Mason::Exception v1.1; > HTML::Mason::Exception::Abort v1.1; > HTML::Mason::Exception::Compilation v1.1; > HTML::Mason::Exception::Compilation::IncompatibleCompiler v1.1; > HTML::Mason::Exception::Compiler v1.1; > HTML::Mason::Exception::Decline v1.1; > HTML::Mason::Exception::Params v1.1; > HTML::Mason::Exception::Syntax v1.1; > HTML::Mason::Exception::System v1.1; > HTML::Mason::Exception::TopLevelNotFound v1.1; > HTML::Mason::Exception::VirtualMethod v1.1; > HTML::Mason::Exceptions v1.43; > HTML::Parser v3.59; > HTML::Scrubber v0.08; > HTML::Tagset v3.20; > HTML::TreeBuilder v3.23; > I18N::LangTags v0.35; > integer v1.00; > IO v1.22; > IO::File v1.13; > IO::Handle v1.25; > IO::InnerFile v2.110; > IO::Lines v2.110; > IO::ScalarArray v2.110; > IO::Seekable v1.1; > IO::Select v1.17; > IO::Socket v1.29; > IO::Socket::INET v1.29; > IO::Socket::UNIX v1.22; > IO::WrapTie v2.110; > IPC::Open2 v1.02; > IPC::Open3 v1.02; > IPC::Run v0.82; > IPC::Run::Debug v0.82; > IPC::Run::IO v0.82; > IPC::Run::Timer v0.82; > List::Util v1.19; > Locale::Maketext v1.09; > Locale::Maketext::Fuzzy v0.10; > Locale::Maketext::Lexicon v0.77; > Locale::Maketext::Lexicon::Gettext v0.17; > Log::Dispatch v2.22; > Log::Dispatch::Base v1.09; > Log::Dispatch::Output v1.26; > Log::Dispatch::Screen v1.17; > Log::Dispatch::Syslog v1.18; > Mail::Address v2.04; > Mail::Field v2.04; > Mail::Field::AddrList v2.04; > Mail::Field::Date v2.04; > Mail::Field::Generic v2.04; > Mail::Header v2.04; > Mail::Internet v2.04; > Mail::Mailer v2.04; > Mail::Util v2.04; > MIME::Base64 v3.07; > MIME::Body v5.427; > MIME::Decoder v5.427; > MIME::Decoder::Base64 v5.427; > MIME::Decoder::Binary v5.427; > MIME::Decoder