Re: [rt-users] CLI question

2013-09-09 Thread Nathan Cutler
In case anyone is interested, I patched the 'rt' script to fix the problem:

# diff -u rt.old rt
--- rt.old  2013-08-14 20:46:23.0 +0200
+++ rt  2013-09-09 16:06:20.0 +0200
@@ -1698,6 +1698,8 @@
 $mon = $month{$monstr} if exists $month{$monstr};
 } elsif ( /(\d{4})-(\d\d)-(\d\d)\s+(\d\d):(\d\d):(\d\d)/ ) {
 ($yr, $mon, $day, $hr, $min, $sec) = ($1, $2-1, $3, $4, $5, $6);
+} elsif ( /(\d{4})-(\d\d)-(\d\d)\s+(\d\d):(\d\d)/ ) {
+($yr, $mon, $day, $hr, $min, $sec) = ($1, $2-1, $3, $4, $5, 0);
 }
 if ( $yr and defined $mon and $day and defined $hr and defined $sec ) {
 return timelocal($sec,$min,$hr,$day,$mon,$yr);

Now the 'rt list' command works as expected.

Nathan


On Thu, Sep 5, 2013 at 4:40 PM, Nathan Cutler presnyprek...@gmail.com wrote:
 I'm trying to use the 'rt' command line script. It's working, except
 for an annoying error message:

 $ rt list status='new'
 Query:status='new'
 Ticket Owner QueueAge   Told Status Requestor Subject
 
 Unknown date format in parsedate: '2011-09-30 13:44'

 This Unknown date format error is written once for each line of output.

 Reading the code, I can see that RT is expecting the date format to
 include the seconds, yet in my case the seconds are missing.

 I can patch the code to add :00 on the end, but I'm curious to hear
 if others can reproduce this, or any ideas for a proper fix.

 Thanks!

 Nathan


[rt-users] example code to add button (or hyperlink) to ticket display?

2013-09-09 Thread Boli

Hi All,

I've been hunting for some example code somewhere but haven't managed to 
find any.


I want to (cleanly) add a button or hyperlink to Ticket/Display.html 
that links to (for example)


http://www.example.xyz/something?id=ticketnumber

If anyone can point me in the right direction I'd appreciate it.

Oh, and I want to do it cleanly - which I think means using a Callback?

Any assistance/advice much appreciated,

B
--
Jon 'Boli' Copeland
Network Engineer
IT Sales  Services Ltd
b...@itss.co.tz
+255 (0) 685 374780


Re: [rt-users] Dynamic choice of templates based on the value of a CF

2013-09-09 Thread Gene LeDuc
In the past I ended up turning the templates into perl programs.  I made 
all the decisions within the template and then built the output based on 
that logic.  It wasn't very pretty (it was ugly, actually), but it 
worked flawlessly for years.  Gotta be careful with maintenance on the 
templates, though, because a seemingly unrelated change in one part of 
the template sometimes was more related to other parts of the template 
than we thought.


Gene

On 9/6/2013 1:33 PM, Landon Stewart wrote:

On 6 September 2013 11:55, Landon Stewart lstew...@iweb.com
mailto:lstew...@iweb.com wrote:

Actually I believe I found the answer which I'm going to try…  I
basically need a hybrid of these two because we also send different
copies of templates depending on the language the customer prefers
to be communicated with in.

http://requesttracker.wikia.com/wiki/ForkTemplate
http://requesttracker.wikia.com/wiki/ChooseTemplateByUserLang

So - never mind my original post unless you have any information
that's better than the two ones above.


Well after trying and trying - none of this has worked because
SetTemplate() is no longer a valid method for Conditions in RT 4.0.17
among other reasons.

If anyone has any information on how to dynamically set the Template in
a Scrip with RT 4.0.x I would greatly appreciate it!

--
Landon Stewart :: lstew...@iweb.com mailto:lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932




Re: [rt-users] Apache log RT usernames

2013-09-09 Thread Lep Rykaun

Is it possible to log RT usernames in the apache access log in RT4?  It looks 
like it was relatively simple to add in RT3, but I'm having no luck setting 
this up in RT4.  Tried setting %ENV vars, and passing $r-notes between apache 
and RT while using custom apache logformats but no luck.  any help or pointing 
in the right direction would be appreciated.  Seems it should be something 
relatively simple but not able to find much on the web about this.

Thanks.

  

Re: [rt-users] Inserting a user with mysql INSERT

2013-09-09 Thread Beachey, Kendric
The crickets and I poked around in other tables, trying to figure out which 
magic rows to insert to make RT fully recognize my inserted user, but I never 
got it to work.

But there is a happy ending anyway:  I took another working account, from some 
guy who quit probably 10 years ago, and re-purposed it into the account I 
needed.  This worked just fine...and is probably what I should have done in the 
first place!
--
Kendric Beachey



-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Beachey, Kendric
Sent: Friday, September 06, 2013 2:56 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Inserting a user with mysql INSERT

I need to create an account for a catch-all email address that will be sending 
requests to our RT from a separate workflow.  No matter which user triggers the 
action, the email will appear to come from product.sup...@company.com.

When I try to use the GUI to create the user, it fails...looking at the log 
file, it seems to be because it can't find an equivalent user in our 
company-wide Active Directory.  (This is a useful thing to seed most user 
details...name, department, phone, etc. for *real* people.)

I don't need all the details for this user, so I decided I'd be OK to have the 
user created without all the extra goodies, and went right to the mysql command 
line.

insert into Users set Name='productsupport', 
EmailAddress='product.supp...@company.com';

This succeeded fine...I can see the row is in the database.  But when I try to 
call up the user from the admin GUI, it says it can't find it.  Are there other 
fields I should fill in?  Are there actually other tables that need rows 
inserted too?
--
Kendric Beachey




CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of 
the intended recipient(s) and contain information that may be confidential 
and/or legally privileged. If you have received this email in error, please 
notify the sender by reply email and delete the message. Any disclosure, 
copying, distribution or use of this communication (including attachments) by 
someone other than the intended recipient is prohibited. Thank you.





Re: [rt-users] Inserting a user with mysql INSERT

2013-09-09 Thread Kevin Falcone
On Mon, Sep 09, 2013 at 08:26:15PM +, Beachey, Kendric wrote:
 The crickets and I poked around in other tables, trying to figure out which 
 magic rows to insert to make RT fully recognize my inserted user, but I never 
 got it to work.

I suspect you forgot to temporarily disable this
https://metacpan.org/source/TSIBLEY/RT-Authen-ExternalAuth-0.17/etc/RT_SiteConfig.pm#L65

 But there is a happy ending anyway: I took another working account,
 from some guy who quit probably 10 years ago, and re-purposed it into
 the account I needed. This worked just fine...and is probably what I
 should have done in the first place!

You'll have some weird results doing this, since any old tickets
associated with that guy will now be associated with this user.

-kevin


pgpA5hw_xPYVX.pgp
Description: PGP signature


Re: [rt-users] Result page not up to date after TransactionBatch scrips

2013-09-09 Thread Kevin Falcone
On Wed, Sep 04, 2013 at 10:16:16AM +0200, Rafal Matera wrote:
 We use RT 4.0.13, We customized our installation by some scrips. Part of
 them have to work in TransactionBatch mode.
 One of the scrips changes the ticket owner on queue change. This is done by
 scrip working in mentioned TransactionBatch mode.
 
 When the queue is changed on Basics screen (Ticket/Modify.html), scrip is
 executed without a failure.
 The problem is that result page shows the OLD VALUE of the owner.
 Clicking Display or Basics again shows that owner was really changed by the
 scrip.

I'm not surprised.  In order to avoid problems with TransactionBatch
scrips, the ticket is cloned and worked on.  The ticket object in the
page is not directly acted on by the Scrip.

TransactionBatch scrips through the 3.6/3.8/4.0 series have been
inconsistent about when it updates. I don't think there's ever been a
guarantee that it will update the object and TransactionBatch scrips
in general are too magical.

 Do you have any idea, how to force RT to show current values on result
 page ?

Use one of the other callbacks in that page to reload the ticket
object, $TicketObj-Load($TicketObj-Id); from the BeforeActionList
callback or one of the others should be enough.

-kevin


pgplbIZVa8KYR.pgp
Description: PGP signature


[rt-users] problem with PriorityAsString extension

2013-09-09 Thread Rob Chanter
Hi list,

I've installed the RT::Extension::PriorityAsString extension into RT4.04 on
Ubuntu 12.04 LTS. It does, as advertised, display priorities as strings,
but also seems to make an unwanted change to the Edit Queue page.

Before installing the extension, I get a normal input field into which I
can type a number for starting and final priority:

trtd align=rightPriority starts at:/tdtdinput
name=InitialPriority value=17 size=5 //tdtd
align=rightOver time, priority moves toward:/tdtdinput
name=FinalPriority value=22 size=5 /br /spanemrequires
running rt-crontool/em/span/td/tr

After installing/configuring the extension, this is replaced by an
option list containing one entry, which looks like an arrayref.:

trtd align=rightPriority starts at:/tdtdselect
class=select-priority name=InitialPriorityoption
class=array#40;0x27250880#41; value=
ARRAY#40;0x27250880#41;/option/select/tdtd
align=rightOver time, priority moves toward:/tdtdselect
class=select-priority name=FinalPriorityoption
class=array#40;0x27250880#41; value=
ARRAY#40;0x27250880#41;/option/selectbr /spanemrequires
running rt-crontool/em/span/td/tr

I would guess the extension has a misplaced '@' where there should be
a '$'. Perl version is 5.14.2.

This prevents me setting the priorities in new or existing queues. Any
ideas on how to resolve it?

TIA,

rob


Re: [rt-users] problem with PriorityAsString extension

2013-09-09 Thread Ruslan Zakirov
Hi,

Show your config options for the extension and version.


On Tue, Sep 10, 2013 at 9:42 AM, Rob Chanter rchan...@gmail.com wrote:

 Hi list,

 I've installed the RT::Extension::PriorityAsString extension into RT4.04
 on Ubuntu 12.04 LTS. It does, as advertised, display priorities as strings,
 but also seems to make an unwanted change to the Edit Queue page.

 Before installing the extension, I get a normal input field into which I
 can type a number for starting and final priority:

 trtd align=rightPriority starts at:/tdtdinput 
 name=InitialPriority value=17 size=5 //tdtd align=rightOver 
 time, priority moves toward:/tdtdinput name=FinalPriority value=22 
 size=5 /br /spanemrequires running rt-crontool/em/span/td/tr

 After installing/configuring the extension, this is replaced by an option 
 list containing one entry, which looks like an arrayref.:

 trtd align=rightPriority starts at:/tdtdselect 
 class=select-priority name=InitialPriorityoption 
 class=array#40;0x27250880#41; value= 
 ARRAY#40;0x27250880#41;/option/select/tdtd align=rightOver time, 
 priority moves toward:/tdtdselect class=select-priority 
 name=FinalPriorityoption class=array#40;0x27250880#41; value= 
 ARRAY#40;0x27250880#41;/option/selectbr /spanemrequires running 
 rt-crontool/em/span/td/tr

 I would guess the extension has a misplaced '@' where there should be a '$'. 
 Perl version is 5.14.2.

 This prevents me setting the priorities in new or existing queues. Any ideas 
 on how to resolve it?

 TIA,

 rob




-- 
Best regards, Ruslan.