[rt-users] Merging divergent databases

2012-04-25 Thread Phillip Frost
I recently experienced a hardware failure that required that I restore the 
database from a backup that was a few days old. I was later able to recover the 
database at the time of the failure, but not until some new tickets had been 
created and others modified.

Is there some clever way I can query the recovered database for everything that 
changed since the failure, and then merge it into the live database, which is 
missing those changes? The difference is not a whole lot, so even a somewhat 
manual process would be better than nothing.


Re: [rt-users] External auth: set default user options

2012-04-25 Thread Mario
Ruslan Zakirov  gmail.com> writes:

> 
> 
> External auth can only map attributes in ldap to rt attributes and
 it doesn't do groups mapping. Usually you grant rights via groups 
in RT. Often people use combination of external auth and ldap import 
to do groups mapping.


Thanks for reply!
So do not talk about ldap now.
Let's talk about autocreation: how can I automatically grant rights to
autocreated users and the add them to a group?

Thanks,
Mario




Re: [rt-users] Malformormed URL in some email

2012-04-25 Thread Ruslan Zakirov
On Wed, Apr 25, 2012 at 19:20, Gerald  wrote:
> In some mail the url is http://myhostname.com
>
> But we used https.
>
> how can I set up this ?

Make sure all Web* options from the config are set and generated
correctly. Use System Configuration page from Admin interface.


-- 
Best regards, Ruslan.


Re: [rt-users] Queue Group Rights

2012-04-25 Thread Kevin Falcone
On Wed, Apr 25, 2012 at 11:07:47AM -0400, Ronald J. Yacketta wrote:
> We have a  main group lets say Foo which contains several other
> groups (bar, biz, bang, blarg) when I give rights to the group Foo
> to a Queue none of the sub groups inherit the given rights. Is it
> even possible for groups to inherit parent rights? or am I barking
> up the wrong tree and need to add each sub group to a Queue and
> grant it rights?

Please provide an RT version and replication steps.  Recursive group
memberships granting rights to the included groups has been an RT
feature for a long time.

-kevin


pgpq9w77HSdzF.pgp
Description: PGP signature


[rt-users] Malformormed URL in some email

2012-04-25 Thread Gerald

In some mail the url is http://myhostname.com

But we used https.

how can I set up this ?


[rt-users] Queue Group Rights

2012-04-25 Thread Ronald J. Yacketta

Hello all!

We have a  main group lets say Foo which contains several other groups 
(bar, biz, bang, blarg) when I give rights to the group Foo to a Queue 
none of the sub groups inherit the given rights. Is it even possible for 
groups to inherit parent rights? or am I barking up the wrong tree and 
need to add each sub group to a Queue and grant it rights?


-Ron



Re: [rt-users] Plugin LinearEscalate

2012-04-25 Thread Gerald

I have deleted the file in local/lib

and the plugin works !

Very thanks for you.

On 25/04/2012 16:28, Kevin Falcone wrote:

On Wed, Apr 25, 2012 at 03:01:39PM +0200, Gerald wrote:
   

On 25/04/2012 14:49, Kevin Falcone wrote:
 

perl -I/opt/rt4/lib -MRT::Action::LinearEscalate -e1
   

But install script copy plugin LinearEscalate.pm in
/opt/rt4/local/lib/RT/Action/
 

As I mentioned earlier in the thread, LinearEscalate.pm is shipped
with RT 4.0.5, there was no need to install a much older version of a
plugin that is incompatible with RT4.

rt/4.0 (4.0-trunk *)$ ls lib/RT/Action/LinearEscalate.pm
lib/RT/Action/LinearEscalate.pm

You should remove the copy of the plugin in local/lib and try again.

-kevin
   




Re: [rt-users] Plugin LinearEscalate

2012-04-25 Thread Kevin Falcone
On Wed, Apr 25, 2012 at 03:01:39PM +0200, Gerald wrote:
> On 25/04/2012 14:49, Kevin Falcone wrote:
> >perl -I/opt/rt4/lib -MRT::Action::LinearEscalate -e1
> But install script copy plugin LinearEscalate.pm in
> /opt/rt4/local/lib/RT/Action/

As I mentioned earlier in the thread, LinearEscalate.pm is shipped
with RT 4.0.5, there was no need to install a much older version of a
plugin that is incompatible with RT4.  

rt/4.0 (4.0-trunk *)$ ls lib/RT/Action/LinearEscalate.pm 
lib/RT/Action/LinearEscalate.pm

You should remove the copy of the plugin in local/lib and try again.

-kevin


pgpNGcC7AFTGP.pgp
Description: PGP signature


Re: [rt-users] Migration gone awry

2012-04-25 Thread Thomas Sibley
On 04/25/2012 04:45 AM, Troels Knak-Nielsen wrote:
> I know I brought this upon myself, but does any one here have any idea
> about what is wrong?

You didn't create the internal groups RT uses for roles on a ticket,
including Owner.  Running rt-validator may be able to fix this up for
you, but it's likely to not be the only thing that's a little odd in
your db.

Thomas


Re: [rt-users] Plugin LinearEscalate

2012-04-25 Thread Gerald

On 25/04/2012 14:49, Kevin Falcone wrote:

perl -I/opt/rt4/lib -MRT::Action::LinearEscalate -e1
   
But install script copy plugin LinearEscalate.pm in 
/opt/rt4/local/lib/RT/Action/


Re: [rt-users] Plugin LinearEscalate

2012-04-25 Thread Kevin Falcone
On Wed, Apr 25, 2012 at 11:56:43AM +0200, Gerald wrote:
> On 24/04/2012 19:50, Kevin Falcone wrote:
> >perl -I/opt/rt4/lib -MRT::Action::LinearEscalate -e1
> 
> Give :
> 
> root@RT-TEST:/# perl -I/opt/rt4/local/lib/LinearEscalate.pm
> -MRT::Action::LinearEscalate -e1

You copied and pasted wrong.
perl -I/opt/rt4/lib -MRT::Action::LinearEscalate -e1

-kevin

> Can't locate RT/Action/LinearEscalate.pm in @INC (@INC contains:
> /opt/rt4/local/lib/LinearEscalate.pm /etc/perl
> /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1
> /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10
> /usr/share/perl/5.10 /usr/local/lib/site_perl .).
> BEGIN failed--compilation aborted.
> 


pgpkFsrWnC0Th.pgp
Description: PGP signature


Re: [rt-users] Creating a ticket with RT::Ticket->Create

2012-04-25 Thread Paul Tomblin
Thanks.  Found the code in RT/Interface/Web and adapted it like so:

# Get the Master Ticket's creation text
my $attachments = RT::Attachments->new(RT->SystemUser);
$attachments->LimitByTicket($ticket->id);
$attachments->Limit( ALIAS=> $attachments->TransactionAlias,
 FIELD=> 'Type',
 OPERATOR => '=',
 VALUE=> 'Create',
 ENTRYAGGREGATOR => 'OR',
 CASESENSITIVE   => 1
   );

my $mimeObj;

while (my $att = $attachments->Next) {
$mimeObj = MIME::Entity->build(
Type => 'multipart/mixed',
'Message-Id' => RT::Interface::Email::GenMessageId,
Subject => $att->Subject
);
$mimeObj->attach(
Type => $att->ContentType,
Charset => 'UTF-8',
Data => $att->Content);
$mimeObj->make_singlepart;
}

Thanks.

On Wed, Apr 25, 2012 at 1:45 AM, Ruslan Zakirov wrote:

> Create takes content as MIME::Entity object. Steal examples from Comment
> and/or MakeMimeEntity functions.
>
> Ruslan from phone.
> 24.04.2012 22:42 пользователь "Paul Tomblin"  написал:
>
> When I'm creating a ticket with RT::Ticket api, how do I set the text that
>> goes into the box that says ""Describe the Issue below"?  It appears to end
>> up as an attachment, and I can retrieve it from an existing ticket using
>>
>> my $attachments = RT::Attachments->new(RT->SystemUser);
>> $attachments->LimitByTicket($tik->id);
>>
>> foreach my $type (qw(Create Comment Correspond)) {
>>  $attachments->Limit( ALIAS=> $attachments->TransactionAlias,
>>  FIELD=> 'Type',
>>  OPERATOR => '=',
>>  VALUE=> $type,
>>  ENTRYAGGREGATOR => 'OR',
>>  CASESENSITIVE   => 1
>>);
>> }
>>
>> I tried adding it with $ticket->_CreateNote, but then I end up with two
>> "The RT System itself - Ticket created" records.
>>
>> --
>> http://www.linkedin.com/in/paultomblin
>> http://careers.stackoverflow.com/ptomblin
>>
>>


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin


Re: [rt-users] Plugin LinearEscalate

2012-04-25 Thread Gerald

On 24/04/2012 19:50, Kevin Falcone wrote:

perl -I/opt/rt4/lib -MRT::Action::LinearEscalate -e1


Give :

root@RT-TEST:/# perl -I/opt/rt4/local/lib/LinearEscalate.pm 
-MRT::Action::LinearEscalate -e1


Can't locate RT/Action/LinearEscalate.pm in @INC (@INC contains: 
/opt/rt4/local/lib/LinearEscalate.pm /etc/perl 
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 
/usr/local/lib/site_perl .).

BEGIN failed--compilation aborted.



[rt-users] Migration gone awry

2012-04-25 Thread Troels Knak-Nielsen
Hi list,

We are migrating over to RT3 from Lighthouse and I figured I could simply
write a script to fill data directly into the database, rather than going
through the RT api. The reason for me doing this, is that I'm really not
very fluent in perl.

Things appear to work except for one thing - It isn't possible to reassign
tickets. Neither through Take/Steal or through direct assignment. This is
not a permission problem, as there is no problem when we create a new
ticket in the same queue.

The error message we receive is rather cryptical, stating "Could not change
owner:" (Nothing after that colon).

I know I brought this upon myself, but does any one here have any idea
about what is wrong?

We're running RT 3.8 on Ubuntu.

-- 
troels


[rt-users] User could not be created: Could not set user info

2012-04-25 Thread Adrian Stel
Hi,




I have a problem with creating users:
"User could not be created: Could not set user info"


I'm not sure where in RT I should search issues. Could you help me, please


here is log:

[Wed Apr 25 09:13:24 2012] [debug]:
RT::Authen::ExternalAuth::CanonicalizeUserInfo called by
RT::Authen::ExternalAuth
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm
553 with: Address1: , Address2: , AuthSystem: , City: , Comments: ,
ContactInfoSystem: , Country: , Disabled: 0, EmailAddress:
test...@test.pl, EmailEncoding: , ExternalAuthId: ,
ExternalContactInfoId: , FreeformContactInfo: , Gecos: , HomePhone: ,
Lang: , MobilePhone: , Name: test007, NickName: , Organization: ,
PagerPhone: , Privileged: , RealName: , Signature: , State: ,
WebEncoding: , WorkPhone: , Zip:
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:450)
[Wed Apr 25 09:13:24 2012] [debug]: Attempting to get user info using
this external service: My_MySQL
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:458)
[Wed Apr 25 09:13:24 2012] [debug]: Attempting to use this
canonicalization key: Gecos
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:472)
[Wed Apr 25 09:13:25 2012] [critical]:
RT::Authen::ExternalAuth::DBI::CanonicalizeUserInfo  Nothing to
look-up given 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm:174)
[Wed Apr 25 09:13:25 2012] [debug]: Attempting to use this
canonicalization key: Name
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:472)
[Wed Apr 25 09:13:25 2012] [info]:
RT::Authen::ExternalAuth::DBI::CanonicalizeUserInfo INFO CHECK FAILED
Key: username Value: test007 No User Found in External Database!
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/DBI.pm:209)
[Wed Apr 25 09:13:25 2012] [info]:
RT::Authen::ExternalAuth::CanonicalizeUserInfo returning Address1: ,
Address2: , AuthSystem: , City: , Comments: , ContactInfoSystem: ,
Country: , Disabled: 0, EmailAddress: test...@test.pl, EmailEncoding:
, ExternalAuthId: , ExternalContactInfoId: , FreeformContactInfo: ,
Gecos: , HomePhone: , Lang: , MobilePhone: , Name: test007, NickName:
, Organization: , PagerPhone: , Privileged: , RealName: , Signature: ,
State: , WebEncoding: , WorkPhone: , Zip:
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:536)


-- 
Best
Adrian Stelmaszyk


Re: [rt-users] External auth: set default user options

2012-04-25 Thread Ruslan Zakirov
External auth can only map attributes in ldap to rt attributes and it
doesn't do groups mapping. Usually you grant rights via groups in RT. Often
people use combination of external auth and ldap import to do groups
mapping.

Ruslan from phone.
23.04.2012 13:06 пользователь "Mario Giammarco" 
написал:

> Hello,
> I am successfully using external auth to autocreate and autenticate users.
>
> I have a problem now: I need (obviously) to set some defaults like
> language,
> queue, some permissions.
>
> It seems to me that there is no easy way to do it and I cannot find
> documentation.
>
> It seems strange to me because I suppose this it a very common thing.
>
> Can you help me?
>
> Thanks in advance for any help,
>
> Mario
>
>


Re: [rt-users] populate other custom fields from autocomplete custom field

2012-04-25 Thread Ruslan Zakirov
If it's totally automatic action then use scrips. You need custom condition
that fires action when custom field x is set. Search wiki for snippets word.

Ruslan from phone.
23.04.2012 16:19 пользователь "jiten"  написал:

> I have three custom fields:
> 1. Employee name (automcomplete)
> 2. Employee id (not visible to users)
> 3. Business unit
>
> The users will type in the employee name partially and get suggestions and
> complete the name using the suggestions. I have this part working.
>
> I understand that I will have to customize the code and am happy to do
> that.
> What I want to make happen is that the employee id and business unit of
> that employee be automatically set when employee is selected. What is the
> best approach for this and what files would I need to modify?
>