Re: [rt-users] Re-open ticket on comment?

2010-03-26 Thread JJussi
Comments are used only by support personals, comments don't go to customer. 
SO, when customer reply to closed ticket, it's re-opened.

Why you would like to have ticket re-open when someone (not customer) 
comments?!?

On Friday, 26. Marchta 2010 18:51:40 Tyler Hall wrote:

 It seems by default when a ticket is closed and someone emails into
 the comment address, it doesn't re-open the ticket, which can caused
 missed emails, etc.
 
 Is there a way to have RT re-open the ticket if it detects a comment,
 once closed?
 
 Thanks!
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
 Buy a copy at http://rtbook.bestpractical.com
 


-- 
JJussi

Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Move tickets to Queue

2010-02-23 Thread JJussi
How about your own version of 'rt-mailgate'.
Take existing rt-mailgate and add little bit code in it what selects right 
queue base on sender address.

Then you just need that one /etc/aliases line:
  
support:|my-rt-mailgate --action comment  --url http://domain.com/;

This is not what you have asked, but better choose right queue outside RT than 
inside.

On Tuesday, 23. Februaryta 2010 15:16:42 polloxx wrote:

 Thanks for all your suggestions.
 How can I do this using Scrips, so without the need to go to /etc/aliases?
 
 @Kevin: How do I check the return value of Setqueue?
 @Jerrad: We only have a limited number of customers and needed queues.
 
 
 On Tue, Feb 23, 2010 at 3:31 AM, Jerrad Pierce
 
 jpie...@cambridgeenergyalliance.org wrote:
  On Mon, Feb 22, 2010 at 16:30, Jerrad Pierce
 
  jpie...@cambridgeenergyalliance.org wrote:
  As I'm new to RT I'm trying to setup a system for our needs.
  We want a queue for each customer. Tickets are created by email.
 
  However, if you really want to do this, and assuming you
  have a relatively fixed set of requestors/queues, the easiest way to
  handle this would be running rt-mailgate
  with --extension=queue; of course, your current method of scrips
  permits you to programatically create a
  morasse of queues.
 
  --
  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
 
 2010 RT Training Sessions!
 San Francisco, CA, USA - Feb 22  23
 Dublin, Ireland - Mar 15  16
 Boston, MA, USA - April 5  6
 Washington DC, USA - Oct 25  26
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
 Buy a copy at http://rtbook.bestpractical.com
 


-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Move tickets to Queue

2010-02-22 Thread JJussi
Hi!
Why you don't create gmail -queue email alias?
/etc/aliases

gmail: |/opt/rt3/bin/rt-mailgate --queue 'gmail' --action correspond --url 
http://support.company.com/;

so when customer sends email to address gm...@company.com, it goes automaticly 
to gmail -queue!

On Monday, 22. Februaryta 2010 16:25:33 polloxx wrote:

 Dear,
 
 As I'm new to RT I'm trying to setup a system for our needs.
 We want a queue for each customer. Tickets are created by email.
 So I want to test this with my own gmail address:
 
 I've created a queue called 'Gmail'.
 
 In the General queue I've created a Scrip:
 
 Condition: On Create
 Action: User defined
 Template: Global template: Blank
 Stage: TransactionCreate
 
 Custom action cleanup code:
 
 if ($self-TicketObj-RequestorAddresses =~ /pollo...@gmail\.com/){
   $self-TicketObj-SetQueue(Gmail);
   return(1);
 }
 
 return(undef);
 
 So a new created ticket should move from the 'General' to the 'Gmail'
 queue but it doesn't. What am I doing wrong?
 
 Thx,
 P.
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 2010 RT Training Sessions!
 San Francisco, CA, USA - Feb 22  23
 Dublin, Ireland - Mar 15  16
 Boston, MA, USA - April 5  6
 Washington DC, USA - Oct 25  26
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
 Buy a copy at http://rtbook.bestpractical.com
 


-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] RT problem with ticket creation via email

2010-02-17 Thread JJussi
Hi!
I had same kind of problems when I took 'MailPlugins' in use. I made my own 
plugin and as long as plugin didn't return 'RT::CurrentUser' object, I got 
that error.

On Wednesday, 17. Februaryta 2010 23:17:32 Ken Crocker wrote:

 To list,
 
 I have been testing our 3.8.7 session and all looks well, with the
 exception of creating tickets via email.
 I can create tickets fine via the WebUI, but emails gives no joy. I get
 this email back:
 
 RT could not load a valid user, and RT's configuration does not allow
 for the creation of a new user for this email (kfcroc...@lbl.gov).
 
 You might need to grant 'Everyone' the right 'CreateTicket' for the
 queue Test.
 
 I have, of course, applied the CreateTicket right to everyone for the
  Queue Test. Still no joy.
 
 I am thinking that since the email gets to RT, it is probably a filter of
  some sort in our Config settings.
 
 We are using the ExternalAuth extension and ourLDAP filters work fine
 with signing onto the WebUI and using the system in ALL of it's aspects.
 These are our LDAP settings:
 
'My_LDAP' = {'type' = 'ldap',
 'server'   = '.xxx.xxx',# x'd out for this email
 'user' = '',
 'pass' = '',
 'base' = 'ou=people,o=Company Name,c=us',
 'filter' =
 '((|(xxxEmpStat=Staff)(xxxEmpStat=Guest))(|(xxxpan=XX*)))',
 'd_filter' = '(!(|(xxxEmpStat=Staff)(xxxEmpStat=Guest)))',
 'tls'  = 1,
 'net_ldap_args' = [version =  3   ],
 'attr_match_list' = ['Name',
   'EmailAddress',
   'RealName',
   'uid',
  ],
 
 'attr_map' = {  'Name'= 'uid',
  'EmailAddress'= 'mail',
  'Organization'= 'o',
  'RealName'= 'cn',
  'ExternalAuthId'  = 'uid',
  'Gecos'   = 'uid',
  'WorkPhone'   = 'telephoneNumber',
  'Address1'= 'xxxMailStop',
  'Address2'=
 'postalAddress',  }
}
   }
 
 These are some other settings that I think /*MIGHT*/ apply:
 
 Set($TruncateLongAttachments, 1);
 Set($LookupSenderInExternalDatabase, 1);# not actually functional
 -alinc
 Set($SenderMustExistInExternalDatabase, 1);
 Set($ValidateUserEmailAddresses, 1);
 Set($SendmailPath, /usr/lib/sendmail);
 Set($WebExternalAuto , 0); # Do not create accounts based on REMOTE_USER
 setting
 Set($WebExternalAuthContinuous, 0); # prevent checking REMOTE_USER at
 every page load
 
 Any clues? Thanks.
 
 Kenn
 LBNL
 


-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Queue owner see too much

2010-02-11 Thread JJussi
OK..
I managed to fix this... And this would be nice change to orginal code (of 
course real programmer would write it maybe little different way)

So I made copy of SelectQueue to 'local/html/Elements' and changed that...

diff share/html/Elements/SelectQueue local/html/Elements/SelectQueue
77c77
 $ShowNullOption = 1
---
 $ShowNullOption = undef
87a88,97
 
 my $qu = new RT::Queues($session{'CurrentUser'});
 $qu-UnLimit;
 
 while (my $quu = $qu-Next){
   if ($quu-CurrentUserHasRight('SuperUser')) {
 $ShowNullOption = 1;
   }
 }
 



On Wednesday, 10. Februaryta 2010 11:34:11 you wrote:
 Hi!
 At report Tools  Reports  Created in a date range
 user have Queue drop down, where there is two choises. '-' and
 '(current)Queue'.
 If user selects his/her queue, result is from that queue. BUT s/he can
  select that '-', then result is from ALL queues, and that's not good.
 
 How to prevent that user cannot see reports from all queues?
 How to make so that everywhere where user can/should select queue, s/he
  have only one option, his/her own queue?
 


-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Queue owner see too much

2010-02-11 Thread JJussi
On Thursday, 11. Februaryta 2010 17:06:42 Kevin Falcone wrote:

OK..
Have to search and test that.. Strange thing is that Report is only place 
where customer can see too many tickets (just a number, how many tickets there 
is).. 
Everywhere, where there is list of tickets, customer cannot see anything else 
than his/her own queue.

BTW, this rights thing with multi layer rights is... Sometimes hard to 
handle. ;-)

 On Thu, Feb 11, 2010 at 12:43:37PM +0200, JJussi wrote:
  OK..
  I managed to fix this... And this would be nice change to orginal code
  (of course real programmer would write it maybe little different way)
 
 If a report is showing too many tickets, it means you've granted
 ShowTicket too broadly.  Preventing your users from selecting - in the
 queue drop down is just masking over a permissions problem.  All they
 have to do is delete Queue=7 from the query string and they'll still
 be able to see all tickets.
 
 -kevin
 
  So I made copy of SelectQueue to 'local/html/Elements' and changed
  that...
 
  diff share/html/Elements/SelectQueue local/html/Elements/SelectQueue
  77c77
   $ShowNullOption = 1
  ---
 
   $ShowNullOption = undef
 
  87a88,97
 
   my $qu = new RT::Queues($session{'CurrentUser'});
   $qu-UnLimit;
  
   while (my $quu = $qu-Next){
 if ($quu-CurrentUserHasRight('SuperUser')) {
   $ShowNullOption = 1;
 }
   }
 
  On Wednesday, 10. Februaryta 2010 11:34:11 you wrote:
   Hi!
   At report Tools  Reports  Created in a date range
   user have Queue drop down, where there is two choises. '-' and
   '(current)Queue'.
   If user selects his/her queue, result is from that queue. BUT s/he can
select that '-', then result is from ALL queues, and that's not good.
  
   How to prevent that user cannot see reports from all queues?
   How to make so that everywhere where user can/should select queue, s/he
have only one option, his/her own queue?
 


-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] RSS feed

2010-02-10 Thread JJussi
Hi!
Would be NICE to have possibility to control (in RT_SiteConfig.pm) do user 
see RSS feed or not.
Our company policy says that RSS feed of tickets is not allowed, and now only 
way (far as I know) to prevent that is edit 
'share/html/Search/Elements/ResultViews' file.

-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Queue owner see too much

2010-02-10 Thread JJussi
Hi!
At report Tools  Reports  Created in a date range
user have Queue drop down, where there is two choises. '-' and 
'(current)Queue'.
If user selects his/her queue, result is from that queue. BUT s/he can select 
that '-', then result is from ALL queues, and that's not good. 

How to prevent that user cannot see reports from all queues?
How to make so that everywhere where user can/should select queue, s/he have 
only one option, his/her own queue?

-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Creating Group and giving Rights.

2010-02-02 Thread JJussi
Hi!
Is there somewhere document what would tell what are correlations between 
database tables and information there?
f.ex. Principals vs. ACL. Both have PrincipalType and PrincipalId (ACL have 
PrincipalId and Principals have id/ObjectId).
Or do I need to read thru all source codes and collect information from 
there..

Because reading source codes, I notice that some functions what I need (to 
change or extract information) are missing.

On Monday, 1. Februaryta 2010 19:44:55 Joop van de Wege wrote:
 Ken Crocker wrote:
  JJussi,
 
  I use the WebUI. It's wy easier. The programming is already
  done, so why re-create the same wheel?
 
 Well, ever tried to change a couple of hundred users and/or groups that
 way ;-)
 
 I wrote a script which sets rights on groups/queues/global. Will try to
 dig it up and post to the wiki, even its a bit rough.
 
 Regards,
 
 Joop
 


-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Creating Group and giving Rights.

2010-02-01 Thread JJussi
On Monday, 1. Februaryta 2010 08:31:27 Jarno Huuskonen wrote:



 Hi,
 
  On Friday, 29. January 2010 13:15:37 JJussi wrote:
  Hi to list,
  (I'm not very good Perl programmer, so this question may be (too) simple)
 
  I can create group easily:
 
  my $group = new RT::Group($RT::SystemUser);
  my $gid = $group-CreateUserDefinedGroup(
Name  = $vars{nimi},
Description   = $vars{kuvaus},
  );
 
  To give rights to that group I (try) to use:
 
  my @gacl=('ShowTicket','CreateTicket','SeeQueue','ReplyToTicket');
  my $principal = new RT::Principal($RT::SystemUser);
  my $pid = $principal-Create(
PrincipalType = 'Group',
ObjectId = $gid,
Disabled = '0',
  );
 
  foreach (@gacl)
  {
$xxx-GrandRight( Right = $_, Object = $gid);
  }
 
  That $xxx is problem.. I need Principal-Object there, but
  CreateUserDefinedGroup returns GroupID. How I can get that Object?
 
 What are you trying to achieve ? Are you trying to give the new group
 permissions to some queueu ?

Situation, where queue have group-rights.
So, at ACL -table we get one line per every right..
*principaltype = Group
*principalid = Groups-id
*rightname = ... ReplyToTicket
*objecttype = RT:Queue
*objectid = ...




 
 Something like this works for me:
 
 my $queue = RT::Queue-new($RT::SystemUser);
 $queue-Load($queuename);
 
 foreach my $tmp_right (@group_rights) {
 my ($status, $msg) = $group-PrincipalObj-GrantRight(
 Right = $tmp_right,
 Object = $queue);
 
 }
 

This didn't work.. What ever I try to do, I get: RT::Principal::GrandRight 
Unimplemented in main.

-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] Creating Group and giving Rights.

2010-01-30 Thread JJussi
Hi list!

What, nowbody have any good answers. To how I, can give rights to just created 
group..
And I thought that I'm poor programmer...

On Friday, 29. Januaryta 2010 13:15:37 JJussi wrote:
 Hi to list,
 (I'm not very good Perl programmer, so this question may be (too) simple)
 
 I can create group easily:
 
 my $group = new RT::Group($RT::SystemUser);
 my $gid = $group-CreateUserDefinedGroup(
   Name  = $vars{nimi},
   Description   = $vars{kuvaus},
 );
 
 To give rights to that group I (try) to use:
 
 my @gacl=('ShowTicket','CreateTicket','SeeQueue','ReplyToTicket');
 my $principal = new RT::Principal($RT::SystemUser);
 my $pid = $principal-Create(
   PrincipalType = 'Group',
   ObjectId = $gid,
   Disabled = '0',
 );
 
 foreach (@gacl)
 {
   $xxx-GrandRight( Right = $_, Object = $gid);
 }
 
 That $xxx is problem.. I need Principal-Object there, but
 CreateUserDefinedGroup returns GroupID. How I can get that Object?
 


-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Creating Group and giving Rights.

2010-01-29 Thread JJussi
Hi to list,
(I'm not very good Perl programmer, so this question may be (too) simple)

I can create group easily:

my $group = new RT::Group($RT::SystemUser);
my $gid = $group-CreateUserDefinedGroup(
  Name  = $vars{nimi},
  Description   = $vars{kuvaus},
);

To give rights to that group I (try) to use:

my @gacl=('ShowTicket','CreateTicket','SeeQueue','ReplyToTicket');
my $principal = new RT::Principal($RT::SystemUser);
my $pid = $principal-Create(
  PrincipalType = 'Group',
  ObjectId = $gid,
  Disabled = '0',
);  

foreach (@gacl)
{ 
  $xxx-GrandRight( Right = $_, Object = $gid);
}

That $xxx is problem.. I need Principal-Object there, but 
CreateUserDefinedGroup returns GroupID. How I can get that Object?

-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] MailPlugins -problem..

2010-01-29 Thread JJussi
Hi list..

if I set at RT_SiteConfig.pm
Set(@MailPlugins, 'Auth::DomainAsQueue');

System runs that DomainAsQueue fine, BUT after that I runs Auth::MailFrom -
plugin... How I can prevent that happened?

-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] MailPlugins -problem..

2010-01-29 Thread JJussi
Hi!
I managed to solve problem.. I just needed to return RT::CurrentUser 
object... What is some how stupid, because filter is just checking that is 
it legal to past current message forward (filter returns value -1..1).  If 
system works other ways fine, why system cannot continue work as it was 
working, just if filter returns values -1 or 0 it would act as it should be.. 
(Sending error message to requestor, or just put message to garbage bin)

On Friday, 29. Januaryta 2010 18:28:30 JJussi wrote:
 Hi list..
 
 if I set at RT_SiteConfig.pm
 Set(@MailPlugins, 'Auth::DomainAsQueue');
 
 System runs that DomainAsQueue fine, BUT after that I runs Auth::MailFrom -
 plugin... How I can prevent that happened?
 


-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Error

2010-01-28 Thread JJussi
Hi!
(using RT 3.8.7)
I have made simple Perl script to add users and queues to database. 
However, I get next error message:
RT::User::Validate Unimplemented in RT::Record. (/opt/rt3/lib/RT/Record.pm line 
267)

Script is:
#!/usr/bin/perl
# luojono -perl scripti
use warnings;
use strict;
use RT::Interface::CLI qw(CleanEnv);
use RT::User;
use RT::Queue;
use RT::Queues;

RT::LoadConfig();
RT::Init();

my $user = RT::User-new($RT::SystemUser); 
my $queues = new RT::Queues($RT::SystemUser);

my $domainosa = 'domain.fi';

my $uid = $user-Create( 
  Name  = $vars{nimi},
  EmailAddress  = $vars{oemail}, 
  RealName  = $vars{omistaja},
  FreeformContactInfo
= 'Tiketti omistaja: '.$vars{kuvaus},
  NickName  = '', 
  Privileged= 1,
  Password  = , 
  Address1  = '',
  Address2  = '', 
  City  = '',
  State = '',
  Zip   = '',
  Country   = '',
  WorkPhone = '',
  MobilePhone   = '',
);

my $qid = $queues-Create(
  Name  = $vars{nimi},
  Description   = $vars{kuvaus},
  CorrespondAddress = $vars{nimi}.'@'.$domainosa,
  CommentAddress= $vars{nimi}.'-comment@'.$domainosa,
  InitialPriority   = $vars{minpri},
  FinalPriority = $vars{maxpri},
  DefaultDueIn  = $vars{maxaika},
);  

-- 
JJussi
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Error

2010-01-28 Thread JJussi
On Thursday, 28. Januaryta 2010 19:21:00 Kevin Falcone wrote:

Hi!
Yes and no..  Actually it was that password what was not set to anything 
'Password =,' :-(
(stupid simple typo-error)

 On Thu, Jan 28, 2010 at 11:59:35AM +0200, JJussi wrote:
  Hi!
  (using RT 3.8.7)
  I have made simple Perl script to add users and queues to database.
  However, I get next error message:
  RT::User::Validate Unimplemented in RT::Record.
  (/opt/rt3/lib/RT/Record.pm line 267)
 
 Most likely, one of the elements of %vars is undef and causing the
 list you're passing to Create to contain an empty key.
 
 -kevin
 
  Script is:
  #!/usr/bin/perl
  # luojono -perl scripti
  use warnings;
  use strict;
  use RT::Interface::CLI qw(CleanEnv);
  use RT::User;
  use RT::Queue;
  use RT::Queues;
 
  RT::LoadConfig();
  RT::Init();
 
  my $user = RT::User-new($RT::SystemUser);
  my $queues = new RT::Queues($RT::SystemUser);
 
  my $domainosa = 'domain.fi';
 
  my $uid = $user-Create(
Name  = $vars{nimi},
EmailAddress  = $vars{oemail},
RealName  = $vars{omistaja},
FreeformContactInfo
  = 'Tiketti omistaja: '.$vars{kuvaus},
NickName  = '',
Privileged= 1,
Password  = ,
Address1  = '',
Address2  = '',
City  = '',
State = '',
Zip   = '',
Country   = '',
WorkPhone = '',
MobilePhone   = '',
  );
 
  my $qid = $queues-Create(
Name  = $vars{nimi},
Description   = $vars{kuvaus},
CorrespondAddress = $vars{nimi}.'@'.$domainosa,
CommentAddress= $vars{nimi}.'-comment@'.$domainosa,
InitialPriority   = $vars{minpri},
FinalPriority = $vars{maxpri},
DefaultDueIn  = $vars{maxaika},
  );
 


-- 
Skype-puhelut: jjussi
Jussi Jääskeläinen  http://www.jjussi.com

doogie Culus: my bug with openssh appears to be fixed in 2.5.2, but
 master runs 2.3.0
Culus Don't even start
doogie I just did.
Culus You guys are going to drive me to build a huge giant robot and
destroy all of texas, aren't you?
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com