[Bps-public-commit] rt-extension-assets-import-csv branch, master, updated. 1.0-3-g0e2d137

Alex Vandiver alexmv at bestpractical.com
Tue Feb 18 18:01:23 EST 2014


The branch, master has been updated
       via  0e2d1378046a400b3794e71d83aebae6e94bf73e (commit)
       via  b1d3ad9a6640b8477cb02d6de6606efb0e85ace2 (commit)
       via  b9502c8922cc68b50e255fd8c9909cd2a1349eb3 (commit)
      from  8d07b6b33cecf67adaae3b92aa30ea97eb810e66 (commit)

Summary of changes:
 Changes                               |  4 ++++
 META.yml                              |  2 +-
 README                                | 41 +++++++++++++++++----------------
 lib/RT/Extension/Assets/Import/CSV.pm | 43 +++++++++++++++++++----------------
 4 files changed, 50 insertions(+), 40 deletions(-)

- Log -----------------------------------------------------------------
commit b9502c8922cc68b50e255fd8c9909cd2a1349eb3
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Feb 18 17:57:35 2014 -0500

    Fix examples; "CF." is required before CF names

diff --git a/lib/RT/Extension/Assets/Import/CSV.pm b/lib/RT/Extension/Assets/Import/CSV.pm
index 5f3fb8b..f5bd833 100644
--- a/lib/RT/Extension/Assets/Import/CSV.pm
+++ b/lib/RT/Extension/Assets/Import/CSV.pm
@@ -350,10 +350,10 @@ of assets, where the column titled C<serviceTag> is unique:
 
     Set( $AssetsImportUniqueCF, 'Service Tag' );
     Set( %AssetsImportFieldMapping,
-        # 'RT custom field name' => 'CSV field name'
-        'Service Tag'            => 'serviceTag',
-        'Location'               => 'building',
-        'Serial #'               => 'serialNo',
+        'Name'           => 'description',
+        'CF.Service Tag' => 'serviceTag',
+        'CF.Location'    => 'building',
+        'CF.Serial #'    => 'serialNo',
     );
 
 =head2 Constant values
@@ -364,11 +364,11 @@ the mapping) with a slash, like so:
 
     Set( $AssetsImportUniqueCF, 'Service Tag' );
     Set( %AssetsImportFieldMapping,
-        # 'RT custom field name' => 'CSV field name'
-        'Service Tag'            => 'serviceTag',
-        'Location'               => 'building',
-        'Serial #'               => 'serialNo',
-        'Catalog'                => \'Hardware',
+        'Name'           => 'description',
+        'Catalog'        => \'Hardware',
+        'CF.Service Tag' => 'serviceTag',
+        'CF.Location'    => 'building',
+        'CF.Serial #'    => 'serialNo',
     );
 
 Every imported asset will now be added to the Hardware catalog in RT.
@@ -384,10 +384,10 @@ subroutine will be called with a hash reference of the parsed CSV row.
 
     Set( $AssetsImportUniqueCF, 'Service Tag' );
     Set( %AssetsImportFieldMapping,
-        # 'RT custom field name' => 'CSV field name'
-        'Service Tag'            => 'serviceTag',
-        'Location'               => 'building',
-        'Weight'                 => sub { $_[0]->{"Weight (kg)"} || "(unknown)" },
+        'Name'           => 'description',
+        'CF.Service Tag' => 'serviceTag',
+        'CF.Location'    => 'building',
+        'CF.Weight'      => sub { $_[0]->{"Weight (kg)"} || "(unknown)" },
     );
 
 =head2 Numeric identifiers
@@ -398,10 +398,10 @@ choose to leave C<$AssetsImportUniqueCF> unset, and assign to C<id> in
 the C<%AssetsImportFieldMapping>:
 
     Set( %AssetsImportFieldMapping,
-        # 'RT custom field name' => 'CSV field name'
-        'id'                     => 'serviceTag',
-        'Location'               => 'building',
-        'Serial #'               => 'serialNo',
+        'id'             => 'serviceTag',
+        'Name'           => 'description',
+        'CF.Service Tag' => 'serviceTag',
+        'CF.Serial #'    => 'serialNo',
     );
 
 This requires that, after the import, RT becomes the generator of all

commit b1d3ad9a6640b8477cb02d6de6606efb0e85ace2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Feb 18 17:57:47 2014 -0500

    Minor documentation updates

diff --git a/lib/RT/Extension/Assets/Import/CSV.pm b/lib/RT/Extension/Assets/Import/CSV.pm
index f5bd833..0fe3ffe 100644
--- a/lib/RT/Extension/Assets/Import/CSV.pm
+++ b/lib/RT/Extension/Assets/Import/CSV.pm
@@ -359,7 +359,7 @@ of assets, where the column titled C<serviceTag> is unique:
 =head2 Constant values
 
 If you want to set an RT column or custom field to a static value for
-all imported assets, proceed the "CSV field name" (right hand side of
+all imported assets, precede the "CSV field name" (right hand side of
 the mapping) with a slash, like so:
 
     Set( $AssetsImportUniqueCF, 'Service Tag' );
@@ -390,6 +390,9 @@ subroutine will be called with a hash reference of the parsed CSV row.
         'CF.Weight'      => sub { $_[0]->{"Weight (kg)"} || "(unknown)" },
     );
 
+Using computed columns may cause false-positive "unused column"
+warnings; these can be ignored.
+
 =head2 Numeric identifiers
 
 If you are already using a numeric identifier to uniquely track your
@@ -420,7 +423,7 @@ or L<bug-RT-Extension-Assets-Import-CSV at rt.cpan.org>.
 
 =head1 LICENSE AND COPYRIGHT
 
-This software is Copyright (c) 2012 by Best Practical Solutions
+This software is Copyright (c) 2014 by Best Practical Solutions
 
 This is free software, licensed under:
 

commit 0e2d1378046a400b3794e71d83aebae6e94bf73e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Feb 18 18:01:08 2014 -0500

    Version 1.1 releng

diff --git a/Changes b/Changes
index 60b7303..a48bbcb 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+1.0 2014-02-18
+
+ - Documentation fixes; no behavior changes.
+
 1.0 2014-02-05
 
  - Initial release
diff --git a/META.yml b/META.yml
index 1314185..be29ed5 100644
--- a/META.yml
+++ b/META.yml
@@ -22,4 +22,4 @@ requires:
   Text::CSV_XS: 0
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 1.0
+version: 1.1
diff --git a/README b/README
index b0c9f86..e988f5b 100644
--- a/README
+++ b/README
@@ -24,24 +24,24 @@ CONFIGURATION
 
         Set( $AssetsImportUniqueCF, 'Service Tag' );
         Set( %AssetsImportFieldMapping,
-            # 'RT custom field name' => 'CSV field name'
-            'Service Tag'            => 'serviceTag',
-            'Location'               => 'building',
-            'Serial #'               => 'serialNo',
+            'Name'           => 'description',
+            'CF.Service Tag' => 'serviceTag',
+            'CF.Location'    => 'building',
+            'CF.Serial #'    => 'serialNo',
         );
 
   Constant values
     If you want to set an RT column or custom field to a static value for
-    all imported assets, proceed the "CSV field name" (right hand side of
+    all imported assets, precede the "CSV field name" (right hand side of
     the mapping) with a slash, like so:
 
         Set( $AssetsImportUniqueCF, 'Service Tag' );
         Set( %AssetsImportFieldMapping,
-            # 'RT custom field name' => 'CSV field name'
-            'Service Tag'            => 'serviceTag',
-            'Location'               => 'building',
-            'Serial #'               => 'serialNo',
-            'Catalog'                => \'Hardware',
+            'Name'           => 'description',
+            'Catalog'        => \'Hardware',
+            'CF.Service Tag' => 'serviceTag',
+            'CF.Location'    => 'building',
+            'CF.Serial #'    => 'serialNo',
         );
 
     Every imported asset will now be added to the Hardware catalog in RT.
@@ -56,12 +56,15 @@ CONFIGURATION
 
         Set( $AssetsImportUniqueCF, 'Service Tag' );
         Set( %AssetsImportFieldMapping,
-            # 'RT custom field name' => 'CSV field name'
-            'Service Tag'            => 'serviceTag',
-            'Location'               => 'building',
-            'Weight'                 => sub { $_[0]->{"Weight (kg)"} || "(unknown)" },
+            'Name'           => 'description',
+            'CF.Service Tag' => 'serviceTag',
+            'CF.Location'    => 'building',
+            'CF.Weight'      => sub { $_[0]->{"Weight (kg)"} || "(unknown)" },
         );
 
+    Using computed columns may cause false-positive "unused column"
+    warnings; these can be ignored.
+
   Numeric identifiers
     If you are already using a numeric identifier to uniquely track your
     assets, and wish RT to take over handling of that identifier, you can
@@ -69,10 +72,10 @@ CONFIGURATION
     %AssetsImportFieldMapping:
 
         Set( %AssetsImportFieldMapping,
-            # 'RT custom field name' => 'CSV field name'
-            'id'                     => 'serviceTag',
-            'Location'               => 'building',
-            'Serial #'               => 'serialNo',
+            'id'             => 'serviceTag',
+            'Name'           => 'description',
+            'CF.Service Tag' => 'serviceTag',
+            'CF.Serial #'    => 'serialNo',
         );
 
     This requires that, after the import, RT becomes the generator of all
@@ -87,7 +90,7 @@ BUGS
     port-CSV> or bug-RT-Extension-Assets-Import-CSV at rt.cpan.org.
 
 LICENSE AND COPYRIGHT
-    This software is Copyright (c) 2012 by Best Practical Solutions
+    This software is Copyright (c) 2014 by Best Practical Solutions
 
     This is free software, licensed under:
 
diff --git a/lib/RT/Extension/Assets/Import/CSV.pm b/lib/RT/Extension/Assets/Import/CSV.pm
index 0fe3ffe..75e57b4 100644
--- a/lib/RT/Extension/Assets/Import/CSV.pm
+++ b/lib/RT/Extension/Assets/Import/CSV.pm
@@ -4,7 +4,7 @@ use warnings;
 package RT::Extension::Assets::Import::CSV;
 use Text::CSV_XS;
 
-our $VERSION = '1.0';
+our $VERSION = '1.1';
 
 sub _column {
     ref($_[0]) ? (ref($_[0]) eq "CODE" ?

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list