[Bps-public-commit] rt-extension-assets-import-csv branch, master, updated. 1.4-3-gd107b54
Shawn Moore
shawn at bestpractical.com
Thu Feb 11 16:34:46 EST 2016
The branch, master has been updated
via d107b54f8921279ab82dc64ed16e7bf307e0626a (commit)
via 31382538fd2116a554108ed5fde7103d27e3393f (commit)
via 4473c19e63fbd9ea6a88bb18246c595f77387ee8 (commit)
from 332b10f408e5d5ea5878b0a3401cded4d7d3824f (commit)
Summary of changes:
Changes | 3 +++
META.yml | 5 +---
Makefile.PL | 3 +--
README | 48 +++++++++++++++++++++++++++--------
lib/RT/Extension/Assets/Import/CSV.pm | 16 ++++++++++--
5 files changed, 56 insertions(+), 19 deletions(-)
- Log -----------------------------------------------------------------
commit 4473c19e63fbd9ea6a88bb18246c595f77387ee8
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Thu Feb 11 21:18:53 2016 +0000
Import::CSV doesn't do much if you don't run the script
diff --git a/lib/RT/Extension/Assets/Import/CSV.pm b/lib/RT/Extension/Assets/Import/CSV.pm
index 8a64790..f29d0b0 100644
--- a/lib/RT/Extension/Assets/Import/CSV.pm
+++ b/lib/RT/Extension/Assets/Import/CSV.pm
@@ -337,6 +337,10 @@ configuration.
=item Restart your webserver
+=item Run C<bin/rt-assets-import-csv>
+
+See C<bin/rt-assets-import-csv --help> for more information.
+
=back
=head1 CONFIGURATION
commit 31382538fd2116a554108ed5fde7103d27e3393f
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Thu Feb 11 21:23:53 2016 +0000
2.0 and copyright
diff --git a/Changes b/Changes
index 8f0e9e3..9819f64 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+2.0 2016-02-11
+ - Upgrade to 4.4 which has cored Assets
+
1.4 2014-11-03
- Fix Role import (Owner)
- Allow importing of non-single roles (Held By and Contacts)
diff --git a/META.yml b/META.yml
index e3bdbeb..1a787b7 100644
--- a/META.yml
+++ b/META.yml
@@ -18,13 +18,10 @@ no_index:
directory:
- inc
requires:
- RT::Extension::Assets: 0
Text::CSV_XS: 0
perl: 5.10.1
resources:
license: http://opensource.org/licenses/gpl-license.php
version: '1.4'
x_module_install_rtx_version: '0.36'
-x_requires_rt: 4.2.1
-x_requires_rt_plugins:
- - RT::Extension::Assets
+x_requires_rt: 4.4.0
diff --git a/Makefile.PL b/Makefile.PL
index 09467e6..cc2242a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -15,8 +15,7 @@ substitute( {
'bin/rt-assets-import-csv',
);
-requires_rt '4.2.1';
-requires_rt_plugin 'RT::Extension::Assets';
+requires_rt '4.4.0';
requires 'Text::CSV_XS';
sign;
diff --git a/lib/RT/Extension/Assets/Import/CSV.pm b/lib/RT/Extension/Assets/Import/CSV.pm
index f29d0b0..413ef93 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.4';
+our $VERSION = '2.0';
sub _column {
ref($_[0]) ? (ref($_[0]) eq "CODE" ?
@@ -314,6 +314,14 @@ sub parse_csv {
RT-Extension-Assets-Import-CSV - RT Assets Import from CSV
+=head1 PREREQUISITES
+
+This version of RT::Extension::Assets::Import::CSV requires RT 4.4, as that
+version of RT has Assets built in.
+
+If you're running RT 4.2 with the Assets extension, you should seek an older
+version of this extension; specifically, version 1.4.
+
=head1 INSTALLATION
=over
@@ -426,7 +434,7 @@ or via the web at
=head1 COPYRIGHT
-This extension is Copyright (C) 2014 Best Practical Solutions, LLC.
+This extension is Copyright (C) 2014-2016 Best Practical Solutions, LLC.
This is free software, licensed under:
commit d107b54f8921279ab82dc64ed16e7bf307e0626a
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Thu Feb 11 21:34:41 2016 +0000
Regenerate README
diff --git a/README b/README
index 844bb83..9421efc 100644
--- a/README
+++ b/README
@@ -1,23 +1,42 @@
NAME
+
RT-Extension-Assets-Import-CSV - RT Assets Import from CSV
+PREREQUISITES
+
+ This version of RT::Extension::Assets::Import::CSV requires RT 4.4, as
+ that version of RT has Assets built in.
+
+ If you're running RT 4.2 with the Assets extension, you should seek an
+ older version of this extension; specifically, version 1.4.
+
INSTALLATION
+
perl Makefile.PL
+
make
+
make install
- May need root permissions
+
+ May need root permissions
Edit your /opt/rt4/etc/RT_SiteConfig.pm
- Add this line:
- Plugin('RT::Extension::Assets::Import::CSV');
+ Add this line:
+
+ Plugin('RT::Extension::Assets::Import::CSV');
- See "CONFIGURATION", below, for the remainder of the required
- configuration.
+ See "CONFIGURATION", below, for the remainder of the required
+ configuration.
Restart your webserver
+ Run bin/rt-assets-import-csv
+
+ See bin/rt-assets-import-csv --help for more information.
+
CONFIGURATION
+
The following configuration would be used to import a three-column CSV
of assets, where the column titled serviceTag is unique:
@@ -29,7 +48,8 @@ CONFIGURATION
'CF.Serial #' => 'serialNo',
);
- Constant values
+ Constant values
+
If you want to set an RT column or custom field to a static value for
all imported assets, precede the "CSV field name" (right hand side of
the mapping) with a slash, like so:
@@ -48,10 +68,11 @@ CONFIGURATION
may also be useful when importing assets from CSV sources you don't
control (and don't want to modify each time).
- Computed values
+ Computed values
+
You may also compute values during import, by passing a subroutine
- reference as the value in the %AssetsImportFieldMapping. This subroutine
- will be called with a hash reference of the parsed CSV row.
+ reference as the value in the %AssetsImportFieldMapping. This
+ subroutine will be called with a hash reference of the parsed CSV row.
Set( $AssetsImportUniqueCF, 'Service Tag' );
Set( %AssetsImportFieldMapping,
@@ -64,7 +85,8 @@ CONFIGURATION
Using computed columns may cause false-positive "unused column"
warnings; these can be ignored.
- Numeric identifiers
+ 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
choose to leave $AssetsImportUniqueCF unset, and assign to id in the
@@ -81,9 +103,11 @@ CONFIGURATION
asset ids. Otherwise, asset id conflicts may occur.
AUTHOR
+
Best Practical Solutions, LLC <modules at bestpractical.com>
BUGS
+
All bugs should be reported via email to
L<bug-RT-Extension-Assets-Import-CSV at rt.cpan.org|mailto:bug-RT-Extension-Assets-Import-CSV at rt.cpan.org>
@@ -93,7 +117,9 @@ BUGS
L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-Assets-Import-CSV>.
COPYRIGHT
- This extension is Copyright (C) 2014 Best Practical Solutions, LLC.
+
+ This extension is Copyright (C) 2014-2016 Best Practical Solutions,
+ LLC.
This is free software, licensed under:
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list