Re: [rt-users] errors in upgrade to rt-4.2

2013-09-13 Thread Xin, Qiao
Hi,
Sorry I could not figure out how to reply to existing message, if this creats a 
new ticket.

If say I have RT 3 and RTIR 2.6 running currently. Since RTIR 2.6 works with 
RT3 and RTIR 3.0 only works with RT 4. How can I upgrade  my current system? If 
I upgrade RT to RT 4 first, then the current  RTIR 2.6 will not be compatible 
with RT 4. If I upgrade RTIR to 3.0 first, then it requires RT 4 but my current 
RT system is 3.

A fresh install of RT4 and RTIR 3.0 will work. But how can I migrate the data 
in the old system over to the new system?

Maybe I am missing something here. Please advice.

Thank you for any help.
Best wishes,
Qiao Xin

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training


[rt-users] Using RT::Template with MIMEObj to create a new ticket using ->Create()

2013-09-13 Thread Landon Stewart
This was originally posted to the RTIR list but I'm x-posting it here
because it's not specific to RTIR and I'm still having difficulties.

I've been unable to figure out how to call an action module from another
action module but instead I've been working on an action module that
basically:
- gets called on an Incident (and uses the create and correspond
transactions to open a new Investigations ticket)
- attaches the Incident Reports linked to that Incident to the
Investigation…

I have it creating a ticket although I haven't filled in much of the
CustomFields I'll need to I cannot get it to use a template for some
reason.

Specifically the LoadQueueTemplate() and Parse() a bit of a mystery to me.

Example:
$templateObj->LoadQueueTemplate( Queue => "Investigations", Name =>
$classification." (en)" );
my($ret, $msg) = $templateObj->Parse( TicketObj => $new_ticket,
TransactionObj => $self->TransactionObj );

I am building a MIME::Entity above this called $MIMEObj including all the
attachments etc but I don't understand how to get Parse() to to "do
something" to the MIMEObj to get the MIME::Entity->build( Data => … ) to
use the template.  Also the attachments are coming out in-line in the
message instead of attachments but that's probably because the
"RT-Attach-Message: yes" header is in the template that's not being used if
I'm understanding the use of that header correctly.

A more full representation of the code is here:
http://pastebin.com/QF2tbZqH

Thanks to anyone who has an idea of what I'm missing or doing wrong here
and might have some ideas for me.

-- 
Landon Stewart :: 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

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] CLI and User Custom Fields

2013-09-13 Thread Kevin Falcone
On Fri, Sep 13, 2013 at 10:09:30AM -0400, Triplett, Jeff wrote:
>What is the best way to programmatically add and edit users in RT?

The Perl API which you can read more about on
http://docs.bestpractical.com

If you're just importing users, rather than adding them occasionally,
use something like RT-Extension-LDAPImport instead (or script
something based on it).

https://metacpan.org/release/RT-Extension-LDAPImport

-kevin


pgp1gWnAs2nWN.pgp
Description: PGP signature

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] CLI and User Custom Fields

2013-09-13 Thread Triplett, Jeff
What is the best way to programmatically add and edit users in RT?

Thanks,
Jeff


On Fri, Sep 13, 2013 at 9:54 AM, Kevin Falcone wrote:

> On Fri, Sep 13, 2013 at 09:30:30AM -0400, Triplett, Jeff wrote:
> >I am trying to find a way to set User Custom Fields using the CLI. I
> have tried:
> >rt edit -t users UniqueID set CF-MyCFName="something"
> >rt edit -t users UniqueID set CF.{MyCFName}="something"
> >When I use these commands I get a "Unknown field" error.
> >Is is possible to edit user Custom Fields from the CLI?
>
> The RT CLI is primarily for editing Tickets, not users, queues,
> rights, etc.  I'd be surprised if updating User CFs worked.
>
> -kevin
>
>
> --
> RT Training in New York, October 8th and 9th:
> http://bestpractical.com/training
>



-- 
Thanks,
Jeff Triplett
Systems Administrator
Miami University, Oxford, Ohio
College of Engineering & Computing
109B Benton Hall
513-529-0791

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] CLI and User Custom Fields

2013-09-13 Thread Kevin Falcone
On Fri, Sep 13, 2013 at 09:30:30AM -0400, Triplett, Jeff wrote:
>I am trying to find a way to set User Custom Fields using the CLI. I have 
> tried:
>rt edit -t users UniqueID set CF-MyCFName="something"
>rt edit -t users UniqueID set CF.{MyCFName}="something"
>When I use these commands I get a "Unknown field" error.
>Is is possible to edit user Custom Fields from the CLI?

The RT CLI is primarily for editing Tickets, not users, queues,
rights, etc.  I'd be surprised if updating User CFs worked.

-kevin


pgp5bMGry1t84.pgp
Description: PGP signature

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] errors in upgrade to rt-4.2

2013-09-13 Thread Kevin Falcone
On Fri, Sep 13, 2013 at 01:18:30PM +, Xin, Qiao wrote:
>We failed in upgrading RT from 4.0.5 with RTIR 2.6.1 to 4.2 with the 
> following error. Please help.

I'm confused how you're running 4.0.5 with RTIR 2.6.1, since that
version isn't compatible with RT 4 (RTIR 3.0.0 is the compatible
version).

That old RTIR version appears to be the source of this error as well.

>[8932] [Thu Sep 12 20:27:33 2013] [critical]: Can't wrap non-existent 
> subroutine
>RT::Queue::HasRight at /temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730.
>Compilation failed in require at /temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 
> 730.
>(/temp/rt-4.2.0rc1/sbin/../lib/RT.pm:391)

There are some pretty big changes between RT 3.8 (what RTIR 2.6.1 was
designed to work with) and RT 4.2.  We'll be releasing RTIR 3.2.0 to
be compatible with RT 4.2, but not until after the official 4.2.0
ships.

-kevin


pgpo2rDjeiRfZ.pgp
Description: PGP signature

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

[rt-users] errors in upgrade to rt-4.2

2013-09-13 Thread Xin, Qiao
Hi,

We failed in upgrading RT from 4.0.5 with RTIR 2.6.1 to 4.2 with the following 
error. Please help.

mysql  Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 
5.1
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi


Congratulations. RT has been upgraded. You should now check over
/opt/rt4/etc/RT_Config.pm for any necessary site customization. Additionally,
you should update RT's system database objects by running
make upgrade-database
[root@supporttest rt-4.2.0rc1]# make upgrade-database
/usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib sbin/rt-setup-database 
--action upgrade --prompt-for-dba-password
In order to create or update your RT database, this script needs to connect to 
your  mysql instance on localhost (port '') as root
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Working with:
Type: mysql
Host: localhost
Port:
Name: rt4
User: rt_user
DBA: root
Enter RT version you're upgrading from: 4.0.5

Going to apply following upgrades:
* 4.0.6
* 4.0.9
* 4.0.12
* 4.0.13
* 4.1.0
* 4.1.1
* 4.1.4
* 4.1.5
* 4.1.6
* 4.1.7
* 4.1.8
* 4.1.9
* 4.1.10
* 4.1.11
* 4.1.12
* 4.1.13
* 4.1.14
* 4.1.15
* 4.1.16
* 4.1.17
* 4.1.18
* 4.1.19
* 4.1.20
* 4.1.21
* 4.1.22
* 4.1.23

Enter RT version if you want to stop upgrade at some point,
  or leave it blank if you want apply above upgrades:

IT'S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
Processing 4.0.6
Now populating database schema.
[8932] [Thu Sep 12 20:27:33 2013] [critical]: Can't wrap non-existent 
subroutine RT::Queue::HasRight at /temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730.
Compilation failed in require at /temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730. 
(/temp/rt-4.2.0rc1/sbin/../lib/RT.pm:391)
Trace begun at /temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 295
Log::Dispatch::__ANON__('Log::Dispatch=HASH(0x349c490)', 'Can\'t wrap 
non-existent subroutine RT::Queue::HasRight at 
/temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730.^JCompilation failed in require at 
/temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730.^J') called at 
/temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 391
RT::__ANON__('Can\'t wrap non-existent subroutine RT::Queue::HasRight at 
/temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730.^JCompilation failed in require at 
/temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730.^J') called at 
/temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 731
RT::InitPlugins at /temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 194
RT::Init at sbin/rt-setup-database line 345
main::action_insert('prompt-for-dba-password', 1, 'datafile', undef, 'action', 
'upgrade', 'datadir', './etc/upgrade/4.0.6', 'backcompat', 'ARRAY(0xb470c8)', 
'package', 'RT') called at sbin/rt-setup-database line 549
main::action_upgrade('prompt-for-dba-password', 1, 'action', 'upgrade', 
'package', 'RT') called at sbin/rt-setup-database line 201
Can't wrap non-existent subroutine RT::Queue::HasRight at 
/temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730.
Compilation failed in require at /temp/rt-4.2.0rc1/sbin/../lib/RT.pm line 730.
make: *** [upgrade-database] Error 255



Thanks,
Qiao



-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

[rt-users] CLI and User Custom Fields

2013-09-13 Thread Triplett, Jeff
I am trying to find a way to set User Custom Fields using the CLI.  I have
tried:

rt edit -t users UniqueID set CF-MyCFName="something"

rt edit -t users UniqueID set CF.{MyCFName}="something"

When I use these commands I get a "Unknown field"  error.

Is is possible to edit user Custom Fields from the CLI?

-- 
Thanks,
Jeff Triplett
Systems Administrator
Miami University, Oxford, Ohio
College of Engineering & Computing
109B Benton Hall
513-529-0791

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training