[rt-users] Batch user import?
Checking to see if my messages are going through. I have asked this question twice and haven't seen my question go out or any answers to it. Please! Need help! -- Forwarded message -- From: Carol Sabbar csab...@carthage.edu Date: Thu, Jul 29, 2010 at 9:42 AM Subject: Batch user import? To: rt-users rt-users@lists.bestpractical.com I'd like to import users into Request Tracker from a CSV or similar file. I found some info on gossamer, but not enough to get a working solution. Any really practical solutions are really appreciated. -- Carol Sabbar Director of Information Services Carthage College csab...@carthage.edu -- Carol Sabbar Director of Information Services Carthage College csab...@carthage.edu Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Batch user import?
Have look onto this tiny piece of code... createuser.pl #!/usr/bin/perl use strict; use warnings; BEGIN { die You must define \$RT_HOME\n unless exists $ENV{RT_HOME} }; use lib $ENV{RT_HOME}/lib; use RT; RT::LoadConfig(); RT::Init(); use RT::Interface::CLI qw(GetCurrentUser loc); use RT::Tickets; my $CurrentUser = GetCurrentUser(); die loc(No RT user found.\n) unless ($CurrentUser-Id); die We need exactly 2 Arguments, Name Email\n unless ($#ARGV==1); my $UserName=shift @ARGV; my $Email=shift @ARGV; my $User = RT::User-new($CurrentUser); my ($id,$Message)=$User-Create(Name=$UserName,EmailAddress=$Email,Privileged=1,Password='apassword'); if ($id){ print $Message.\n; } else{ printThis is a error!\n$Message\n; } triggered from a shell script like these: #!/bin/bash export RT_HOME=/opt/rt3 P1=/opt/rt3/local/bin/ U1=/opt/rt3/local/bin/userlist while read zeile; do set -- $zeile echo Bearbeite User: $1 $2 /usr/bin/perl ${P1}creatertuser.pl $1 $2 done$U1 you need a csv file called userlist with the needed values. 2010/8/3 Carol Sabbar csab...@carthage.edu Checking to see if my messages are going through. I have asked this question twice and haven't seen my question go out or any answers to it. Please! Need help! -- Forwarded message -- From: Carol Sabbar csab...@carthage.edu Date: Thu, Jul 29, 2010 at 9:42 AM Subject: Batch user import? To: rt-users rt-users@lists.bestpractical.com I'd like to import users into Request Tracker from a CSV or similar file. I found some info on gossamer, but not enough to get a working solution. Any really practical solutions are really appreciated. -- Carol Sabbar Director of Information Services Carthage College csab...@carthage.edu -- Carol Sabbar Director of Information Services Carthage College csab...@carthage.edu Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com -- MFG Torsten Brumm http://www.brumm.me http://www.elektrofeld.de Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Batch user import?
Carole, We had to add some users from a legacy system so we just created a perl program and used the RT API to load the Users and various info. I like using the API because it basically does what RT does for you and there is less chance of us missing a step. Kenn LBNL On Tue, Aug 3, 2010 at 6:59 AM, Carol Sabbar csab...@carthage.edu wrote: Checking to see if my messages are going through. I have asked this question twice and haven't seen my question go out or any answers to it. Please! Need help! -- Forwarded message -- From: Carol Sabbar csab...@carthage.edu Date: Thu, Jul 29, 2010 at 9:42 AM Subject: Batch user import? To: rt-users rt-users@lists.bestpractical.com I'd like to import users into Request Tracker from a CSV or similar file. I found some info on gossamer, but not enough to get a working solution. Any really practical solutions are really appreciated. -- Carol Sabbar Director of Information Services Carthage College csab...@carthage.edu -- Carol Sabbar Director of Information Services Carthage College csab...@carthage.edu Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Batch user import?
I'd like to import users into Request Tracker from a CSV or similar file. I found some info on gossamer, but not enough to get a working solution. Any really practical solutions are really appreciated. -- Carol Sabbar Director of Information Services Carthage College csab...@carthage.edu Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com