[Bps-public-commit] rt-extension-assets branch, 1.1/config-defaults, created. 1.0-5-gaf17753
Alex Vandiver
alexmv at bestpractical.com
Wed Mar 26 18:53:37 EDT 2014
The branch, 1.1/config-defaults has been created
at af17753ca448b1d8504fb7e709e506f92d6dfabe (commit)
- Log -----------------------------------------------------------------
commit af17753ca448b1d8504fb7e709e506f92d6dfabe
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Mar 26 16:30:22 2014 -0400
Squelch warnings for configs set in RT_SiteConfig.pm
Because RT_SiteConfig.pm is loaded _before_ the plugins', and because
Set() doesn't override values that have already been set, the "default"
values in Assets_Config.pm cause warnings if overridden:
Change of config option 'AssetQueues' at
/opt/rt4/local/plugins/RT-Extension-Assets/etc/Assets_Config.pm line
67 has been ignored. It may be ok, but we want you to be aware. This
option has been set earlier in /opt/rt4/etc/RT_SiteConfig.pm
Squelch these warnings by skipping the Set() if the user has overridden
the value already.
diff --git a/etc/Assets_Config.pm b/etc/Assets_Config.pm
index 93588df..25e275f 100644
--- a/etc/Assets_Config.pm
+++ b/etc/Assets_Config.pm
@@ -53,7 +53,7 @@ Set(%Lifecycles,
'* -> stolen' => { label => "Report stolen" },
},
},
-);
+) unless $Lifecycles{assets};
=item C<@AssetQueues>
@@ -64,7 +64,7 @@ the ticket, even when the ticket has no related assets yet.
=cut
-Set(@AssetQueues, ());
+# Set(@AssetQueues, ());
=item C<$DefaultCatalog>
@@ -90,7 +90,7 @@ Set($AssetSearchFields, {
id => '=',
Name => 'LIKE',
Description => 'LIKE',
-});
+}) unless $AssetSearchFields;
=item C<$AssetSearchFormat>
@@ -106,7 +106,7 @@ Set($AssetSearchFormat, q[
HeldBy,
Contacts,
'__ActiveTickets__ __InactiveTickets__/TITLE:Related tickets',
-]);
+]) unless $AssetSearchFormat;
=item C<$AssetSummaryFormat>
@@ -124,7 +124,7 @@ Set($AssetSummaryFormat, q[
HeldBy,
Contacts,
'__ActiveTickets__ __InactiveTickets__/TITLE:Related tickets',
-]);
+]) unless $AssetSummaryFormat;
=item C<$AssetSummaryRelatedTicketsFormat>
@@ -140,7 +140,7 @@ Set($AssetSummaryRelatedTicketsFormat, q[
'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>',
QueueName,
Status,
-]);
+]) unless $AssetSummaryRelatedTicketsFormat;
=item C<%AdminSearchResultFormat>
@@ -155,7 +155,7 @@ Set(%AdminSearchResultFormat,
q{'<a href="__WebPath__/Admin/Assets/Catalogs/Modify.html?id=__id__">__id__</a>/TITLE:#'}
.q{,'<a href="__WebPath__/Admin/Assets/Catalogs/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
.q{,__Description__,__Lifecycle__,__Disabled__},
-);
+) unless $AdminSearchResultFormat{Catalogs};
=item C<$AssetBasicCustomFieldsOnCreate>
@@ -167,10 +167,6 @@ Set( $AssetBasicCustomFieldsOnCreate, [ 'foo', 'bar' ] );
=cut
-Set($AssetBasicCustomFieldsOnCreate, undef );
-
-=back
-
-=cut
+# Set($AssetBasicCustomFieldsOnCreate, undef );
1;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list