[Rt-commit] rt branch, 4.4/core-assets, updated. rt-4.2.11-42-g5516fdd
Todd Wade
todd at bestpractical.com
Thu Oct 15 10:13:44 EDT 2015
The branch, 4.4/core-assets has been updated
via 5516fdd1dea1c14ca8c76e857baec898ced4f6b8 (commit)
from 222bbd42b456672562b7cc55a0e6d9a2affe3361 (commit)
Summary of changes:
docs/assets.pod | 2 +-
docs/customizing/assets/Tutorial_Configuration.txt | 24 -------------------
docs/customizing/assets/tutorial.pod | 28 +++++++++++-----------
etc/RT_Config.pm.in | 8 ++-----
etc/acl.Pg | 2 +-
etc/upgrade/4.3.10/content | 27 ++++++---------------
lib/RT/Interface/Web.pm | 2 +-
share/html/Admin/Assets/Catalogs/Roles.html | 2 +-
share/html/Asset/ModifyPeople.html | 2 +-
share/html/Asset/Search/Bulk.html | 2 +-
share/html/Ticket/Elements/ShowAssets | 2 +-
11 files changed, 30 insertions(+), 71 deletions(-)
delete mode 100644 docs/customizing/assets/Tutorial_Configuration.txt
- Log -----------------------------------------------------------------
commit 5516fdd1dea1c14ca8c76e857baec898ced4f6b8
Author: Todd Wade <todd at bestpractical.com>
Date: Thu Oct 15 10:07:47 2015 -0400
lib/RT/Interface/Web.pm
share/html/Admin/Assets/Catalogs/Roles.html
share/html/Asset/ModifyPeople.html
share/html/Asset/Search/Bulk.html
- rename ProcessRoleMembers to ProcessAssetRoleMembers
share/html/Ticket/Elements/ShowAssets
- make asset adder input field a little wider
etc/upgrade/4.3.10/content
- update to use new @Catalog data type
etc/acl.Pg
- eos whitespace
etc/RT_Config.pm.in
- eol whitespace
- add assets related portlets to default homepage and user portlets
docs/assets.pod
docs/customizing/assets/tutorial.pod
- update previously missed references to extension
docs/customizing/assets/Tutorial_Configuration.txt
- portlets moved to default configs and groupings in tutorial
+ so this file is unnecessary
diff --git a/docs/assets.pod b/docs/assets.pod
index cf1c232..b8ab169 100644
--- a/docs/assets.pod
+++ b/docs/assets.pod
@@ -156,7 +156,7 @@ Lifecycles configuration (see "Lifecycles" in F<RT_Config.pm>). The default
lifecycle is named "assets". You're free to modify it as much as you'd like,
or add your own lifecycles. Each catalog may have its own lifecycle.
-For the default "assets" configuration, see F<etc/Assets_Config.pm>.
+For the default "assets" configuration, see F<etc/RT_Config.pm>.
=head2 Field organization
diff --git a/docs/customizing/assets/Tutorial_Configuration.txt b/docs/customizing/assets/Tutorial_Configuration.txt
deleted file mode 100644
index 4b5293b..0000000
--- a/docs/customizing/assets/Tutorial_Configuration.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-# Configuration for the assets tutorial.
-# Copy and paste into your RT_SiteConfig.pm to test.
-
-Set(
- $HomepageComponents,
- [
- qw(QuickCreate Quicksearch MyAdminQueues MySupportQueues MyReminders RefreshHomepage Dashboards SavedSearches FindUser MyAssets FindAsset)
- ]
-);
-
-# Move UserAssets to the location you want on the User Summary page
-
-Set(@UserSummaryPortlets, (qw/ExtraInfo CreateTicket UserAssets ActiveTickets InactiveTickets/));
-
-# See the CustomFieldGroupings docs in RT_Config.pm for more info.
-# http://bestpractical.com/docs/rt/latest/RT_Config.html
-
-Set(%CustomFieldGroupings,
- 'RT::Asset' => {
- 'Asset Details' => ['Serial Number', 'Manufacturer', 'Type',
- 'Tracking Number'],
- 'Dates' => ['Support Expiration', 'Issue Date'],
- },
-);
diff --git a/docs/customizing/assets/tutorial.pod b/docs/customizing/assets/tutorial.pod
index e03abf3..735877b 100644
--- a/docs/customizing/assets/tutorial.pod
+++ b/docs/customizing/assets/tutorial.pod
@@ -1,9 +1,9 @@
=head1 Introduction
-This is a basic tutorial for setting up asset tracking in RT using Best
-Practical's Assets extension. At the end, you'll have a basic configuration
-that lets you add assets, search for them, link them to tickets, etc.
+This is a basic tutorial for setting up asset tracking in RT using the Assets
+functionality. At the end, you'll have a basic configuration that lets you add
+assets, search for them, link them to tickets, etc.
=begin HTML
@@ -15,9 +15,9 @@ alt="Asset Search Results" /></p>
You can follow along with the tutorial and try setting things up yourself to
get a feel for all of the administrative controls. If you want to get a jump
start, the files to set up this basic configuration are provided in the
-this distribution in the F<docs/customizing/assets> directory. For
-configuration, look in F<docs/customizing/Tutorial_Configuration.txt>. You
-can copy all or part of it and paste it into your F<RT_SiteConfig.pm>.
+F<docs/customizing/assets> directory. For configuration, look in
+F<docs/customizing/Tutorial_Configuration.txt>. You can copy all or part of it
+and paste it into your F<RT_SiteConfig.pm>.
To load the test catalog, custom fields, and users, run the following from
your RT directory:
@@ -37,7 +37,7 @@ production system.
There are a few configuration options you might set before starting. Assets
offers a C<$DefaultCatalog> feature that works similar to RT's
L<DefaultQueue|http://bestpractical.com/docs/rt/latest/RT_Config.html#DefaultQueue>,
-but you can probably skip it for now since you don't have any catalogs yet.
+but you can probably skip it for now since you only have the one catalog so far.
More interesting are some optional portlets you can activate to add asset data
to RT's pages. MyAssets and FindAsset portlets are available for placement on
@@ -82,9 +82,9 @@ alt="Edit Catalog" /></p>
=end HTML
-You'll also notice that catalogs have a lifecycle just like queues. The assets
-extension comes with a default assets lifecycle, but just like queues you can
-create new ones with custom statuses and other configuration to allow RT to
+You'll also notice that catalogs have a lifecycle just like queues. Request
+tracker is installed with a default assets lifecycle, but just like queues you
+can create new ones with custom statuses and other configuration to allow RT to
reflect the states of your assets.
You can find the asset lifecycle in the F<RT_Config.pm> file in your RT
@@ -107,8 +107,8 @@ alt="Asset Custom Fields" /></p>
=end HTML
-The extension will automatically provide some core values for your assets. Each
-asset can have a Name and Description and, like tickets, they have statuses
+Request Tracker will automatically provide some core values for your assets.
+Each asset can have a Name and Description and, like tickets, they have statuses
based on the lifecycle configuration. You can use Name and Description however
you want and they are not required. However, many of the asset pages use these
fields so it's best to provide a descriptive name to make it easy for people
@@ -271,11 +271,11 @@ status. Then when the ticket is resolved, flip it back to 'in-use'.
=head2 End User Asset Tickets
-If an end user contacts us with some problems with their laptop, RT makes it
+If an end user contacts us with some problem with their laptop, RT makes it
easy to find the correct laptop record and create a ticket for them. Since our
support staff do this frequently, they have added the Find User portlet to
their RT at a glance page and can quickly search for the user and go to their
-User Summary page (new in RT 4.2).
+User Summary page.
We have added the Assigned Assets portlet to the User Summary page, so the
laptop is right there on the page when we find the user. We can just click on
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 9bd7e70..a702b90 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1027,7 +1027,7 @@ Extensions may provide their own portlets for this page.
=cut
-Set(@UserSummaryPortlets, (qw/ExtraInfo CreateTicket ActiveTickets InactiveTickets/));
+Set(@UserSummaryPortlets, (qw/ExtraInfo CreateTicket ActiveTickets InactiveTickets UserAssets /));
=item C<$UserSummaryExtraInfo>
@@ -1242,7 +1242,7 @@ user's customized homepage ("RT at a glance").
Set(
$HomepageComponents,
[
- qw(QuickCreate Quicksearch MyAdminQueues MySupportQueues MyReminders RefreshHomepage Dashboards SavedSearches FindUser) # loc_qw
+ qw(QuickCreate Quicksearch MyAdminQueues MySupportQueues MyReminders RefreshHomepage Dashboards SavedSearches FindUser MyAssets FindAsset) # loc_qw
]
);
@@ -3037,10 +3037,6 @@ Set(%Lifecycles,
},
);
-
-
-
-
=head1 Administrative interface
=over 4
diff --git a/etc/acl.Pg b/etc/acl.Pg
index ed069a8..5f2344b 100644
--- a/etc/acl.Pg
+++ b/etc/acl.Pg
@@ -60,7 +60,7 @@ sub acl {
ObjectClasses
catalogs_id_seq
Catalogs
- assets_id_seq
+ assets_id_seq
Assets
);
diff --git a/etc/upgrade/4.3.10/content b/etc/upgrade/4.3.10/content
index 4694774..fa22946 100644
--- a/etc/upgrade/4.3.10/content
+++ b/etc/upgrade/4.3.10/content
@@ -3,6 +3,13 @@ use warnings;
require RT::Asset;
+our @Catalogs;
+
+ at Catalogs = ({
+ Name => "General assets", # loc
+ Description => "The default catalog", # loc
+});
+
our @Final;
# Create global role groups
@@ -27,24 +34,4 @@ push @Final, sub {
}
};
-# Create default catalog
-push @Final, sub {
- my $Name = 'General assets';
-
- my $catalog = RT::Catalog->new( RT->SystemUser );
- $catalog->Load( $Name );
-
- if ( $catalog->id ) {
- RT->Logger->debug("Catalog role '$Name' already exists.");
- next;
- }
-
- my ($ok, $msg) = $catalog->Create(
- Name => $Name,
- Description => "The default catalog",
- );
- RT->Logger->error("Couldn't create default catalog 'General assets': $msg")
- unless $ok;
-};
-
1;
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index f5c2f91..7841967 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -3901,7 +3901,7 @@ sub LoadAsset {
return $asset;
}
-sub ProcessRoleMembers {
+sub ProcessAssetRoleMembers {
my $object = shift;
my %ARGS = (@_);
my @results;
diff --git a/share/html/Admin/Assets/Catalogs/Roles.html b/share/html/Admin/Assets/Catalogs/Roles.html
index fa553c3..075a792 100644
--- a/share/html/Admin/Assets/Catalogs/Roles.html
+++ b/share/html/Admin/Assets/Catalogs/Roles.html
@@ -72,7 +72,7 @@ my $catalog = LoadCatalog($id);
my @results;
if ($Update) {
- push @results, ProcessRoleMembers( $catalog => %ARGS );
+ push @results, ProcessAssetRoleMembers( $catalog => %ARGS );
MaybeRedirectForResults(
Actions => \@results,
diff --git a/share/html/Asset/ModifyPeople.html b/share/html/Asset/ModifyPeople.html
index 515b091..bb3b39f 100644
--- a/share/html/Asset/ModifyPeople.html
+++ b/share/html/Asset/ModifyPeople.html
@@ -90,7 +90,7 @@ if ($Update) {
);
if ($cf_ok) {
- push @results, ProcessRoleMembers( $asset => %ARGS );
+ push @results, ProcessAssetRoleMembers( $asset => %ARGS );
push @results, ProcessObjectCustomFieldUpdates( Object => $asset, ARGSRef => \%ARGS );
MaybeRedirectForResults(
diff --git a/share/html/Asset/Search/Bulk.html b/share/html/Asset/Search/Bulk.html
index ca7a9e5..60e7748 100644
--- a/share/html/Asset/Search/Bulk.html
+++ b/share/html/Asset/Search/Bulk.html
@@ -179,7 +179,7 @@ if ( $ARGS{Update} ) {
AttributesRef => \@attributes,
ARGSRef => \%basics,
);
- push @tmp_res, ProcessRoleMembers( $asset => %ARGS );
+ push @tmp_res, ProcessAssetRoleMembers( $asset => %ARGS );
push @tmp_res, ProcessObjectCustomFieldUpdates( Object => $asset, ARGSRef => \%ARGS );
push @tmp_res, ProcessRecordLinks( RecordObj => $asset, RecordId => 'Asset', ARGSRef => \%ARGS );
push @tmp_res, ProcessRecordBulkCustomFields( RecordObj => $asset, ARGSRef => \%ARGS );
diff --git a/share/html/Ticket/Elements/ShowAssets b/share/html/Ticket/Elements/ShowAssets
index 9fe7748..444500d 100644
--- a/share/html/Ticket/Elements/ShowAssets
+++ b/share/html/Ticket/Elements/ShowAssets
@@ -191,7 +191,7 @@ if ($ShowRelatedTickets) {
<div class="add-asset">
<label>
<&|/l&>Add an asset to this ticket</&>
- <input size="5" name="<% $Ticket->id %>-RefersTo" placeholder="<&|/l&>Asset #</&>" type="text">
+ <input size="10" name="<% $Ticket->id %>-RefersTo" placeholder="<&|/l&>Asset #</&>" type="text">
</label>
<input type="submit" value="+">
</div>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list