On Wed, Apr 30, 2008 at 07:19:09PM +, Jean-Sebastien Morisset wrote:
On Wed, Apr 30, 2008 at 05:51:39PM +, Jean-Sebastien Morisset wrote:
Aha! Thanks! Ok, so far this seems to work well:
[snip!]
Alright, so I spent a little more time on this script, and added some
validation
If you look in the API documentation about setting a CF (the
'CustomField' object), it will show you where my oversimplification of
$cf-Value=$thing was in err, and how to do it correctly.
On Tue, 2008-04-29 at 21:01 +, Jean-Sebastien Morisset wrote:
On Tue, Apr 29, 2008 at 04:32:43PM -0400,
On Wed, Apr 30, 2008 at 01:06:55PM -0400, Matthew Keller wrote:
If you look in the API documentation about setting a CF (the
'CustomField' object), it will show you where my oversimplification of
$cf-Value=$thing was in err, and how to do it correctly.
Aha! Thanks! Ok, so far this seems to
On Wed, Apr 30, 2008 at 05:51:39PM +, Jean-Sebastien Morisset wrote:
Aha! Thanks! Ok, so far this seems to work well:
[snip!]
Alright, so I spent a little more time on this script, and added some
validation against the customfield select values. Here's an example:
# bin/import-assets.sh
Has anyone developed a script or something to import an inventory into
AT (from a csv file, for example)?
js.
--
Jean-Sebastien Morisset, Sr. UNIX Administrator [EMAIL PROTECTED]
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
The script below takes a tab-delimited file of format:
AssetTag Make Model Serial Building Room MACAddress
And populated a bunch of CFs. Salt to taste.
On Tue, 2008-04-29 at 14:01 +, Jean-Sebastien Morisset wrote:
Has anyone developed a script or something to import an inventory into
AT
Matthew,
Thanks for your code. This was an exellent starting point. Since I
already have a bunch of assets, I tried to incorporate some code to
update assets. I'm not sure what I'm doing wrong though... Here's the
result:
# /opt/rt3/bin/import-assets.sh /tmp/js.csv
gessolx1:
Loaded
The '$at-_Set' calls you're making scare me. Is there a reason you're
setting them iteratively instead of within the Create call?
On Tue, 2008-04-29 at 20:08 +, Jean-Sebastien Morisset wrote:
Matthew,
Thanks for your code. This was an exellent starting point. Since I
already have a
On Tue, Apr 29, 2008 at 04:15:03PM -0400, Matthew Keller wrote:
The '$at-_Set' calls you're making scare me. Is there a reason you're
setting them iteratively instead of within the Create call?
I run a Load, if the Load doesn't work, then do a Create (with just the
basics), after that update
Ah yes... The way I usually do things like that is by grabbing the asset
CF info, ala:
my $AssCFs=$AssObj-CustomFields();
and then setting the appropriate values ala:
while(my $AssCF = $AssCFs-Next()) {
$AssCF-Value = whatever
}
The above is pseudocode from memory, but is +/- 96%
On Tue, Apr 29, 2008 at 04:32:43PM -0400, Matthew Keller wrote:
Ah yes... The way I usually do things like that is by grabbing the asset
CF info, ala:
my $AssCFs=$AssObj-CustomFields();
and then setting the appropriate values ala:
while(my $AssCF = $AssCFs-Next()) {
$AssCF-Value
11 matches
Mail list logo