[rt-users] RT-Assets-Import-CSV surprises

2014-02-08 Thread Joop

Hi All,

Still trying out new things :-)
Found another thing which I think is a shortcut in the documentation. 
Quoting one of the examples:

Set( $AssetsImportUniqueCF, 'Service Tag' );
Set( %AssetsImportFieldMapping,
# 'RT custom field name' = 'CSV field name'
'Service Tag'= 'serviceTag',
'Location'   = 'building',
'Serial #'   = 'serialNo',
'Catalog'= \'Hardware',
);

As I see it both Location and Serial # are Asset CustomFields and not 
one of the basic fields like id,Name,Description. Using this as an 
example I tried to import our UPS Catalog which looks like the following:
id,Name,Description,Status,Type,UPS Batt replaced,UPS Firmware 
revision,UPS Serial Number
553,wag-ups1,APC SmartUPS 
3000,production,BackupPower,2005-08-17,666.6.l,JS0534006874


With the following config part it will import the assets but not the 
last 3 columns which are the CF's of this type.


Set( $AssetsImportUniqueCF, undef );
Set( %AssetsImportFieldMapping,
# 'RT custom field name' = 'CSV field name'
  'id' = 'id',
  'Name'   = 'Name',
  'Description'   = 'Description',
  'Catalog' =\'BackupPower',
  'UPS Batt replaced'   = 'UPS Batt replaced',
  'UPS Firmware revision'   = 'UPS Firmware revision',
  'UPS Serial Number'   = 'UPS Serial Number',
   );

Looking at the output of debug shows that it sees the last 3 columns but 
it doesn't do anything with it. Putting some prints in CSV.pm and 
looking at the code I found out that the config should read:


Set( $AssetsImportUniqueCF, undef );
Set( %AssetsImportFieldMapping,
# 'RT custom field name' = 'CSV field name'
  'id' = 'id',
  'Name'   = 'Name',
  'Description'   = 'Description',
  'Catalog' =\'BackupPower',
  'CF.UPS Batt replaced'   = 'UPS Batt replaced',
  'CF.UPS Firmware revision'   = 'UPS Firmware revision',
  'CF.UPS Serial Number'   = 'UPS Serial Number',
   );

Running the importer with --update will indeed now update the last 3 
columns.


Nowhere in the docs it is mentioned that you need to put CF. in front of 
CustomFields.


Joop


[rt-users] RT-4.2.2 and RT-Assets

2014-02-08 Thread Joop

Hi All,

Still trying out new things :-)

After importing some assets I see that the behaviour of the asset 
display page is different to the ticket page.


Without touching CustomField Grouping I get an error when I click on 
CustomFields in  the display page, 'No grouping specified'
, while in rt-4.2.2 clicking on CustomFields will take you to the Basics 
page with the customfields ready to edit.


I don't mind making a CF Grouping but it shouldn't be needed in a 
default setting or it should be documented that it is a mandatory 
configuration part.


Regards,

Joop


[rt-users] RT-Assets-Import-CSV

2014-02-08 Thread Joop

Hi All,

One more thing :-)

I need/want to migrate a lot of assets from RT-4.0.x with the Assets 
extension to rt-4.2.2 with the bestpractical Asset extension. First 
tests show that it will be a lot of work but will probably work (still 
has to figure out something for the asset-tickets-rtfm links). Right 
now I think I'll need to make a %AssetsImportFieldMapping for each type 
in the old system and place that in RT_SiteConfig run the import edit 
RT_SiteConfig etc...
What would be nice is if the importer would have a commandline option to 
read a configfile with just the %AssetsImportFieldMapping in it, or am I 
overlooking something (probably my missing perl foo)


Regards,

Joop