[Rt-commit] rt branch 5.0/allow-unset-defaultcatalog created. rt-5.0.2-61-g37e311ede1

BPS Git Server git at git.bestpractical.com
Fri Feb 11 21:40:57 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/allow-unset-defaultcatalog has been created
        at  37e311ede171c39251a0d0e1c22b28d1120dc733 (commit)

- Log -----------------------------------------------------------------
commit 37e311ede171c39251a0d0e1c22b28d1120dc733
Author: Brian Conry <bconry at bestpractical.com>
Date:   Tue Feb 8 15:39:22 2022 -0600

    Allow DefualtCatalog to be unset in Web Interface
    
    Previously it was listed as needing to be set, even though the default
    is unset, so the selectbox for it in the Assets subsection of the System
    Configuration page was created without a "(no value)" option.  The
    result of this is that any change made in that subsection would set the
    DefaultCatalog to whichever catalog happened to be first in the list.
    
    It also prevented it from processing a "Reset" as the handling of the
    form data wouldn't accept having nothing selected.

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 6286872212..6865bedcd6 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -1960,8 +1960,10 @@ our %META;
 
     DefaultCatalog => {
         Widget          => '/Widgets/Form/Select',
+        Overridable     => 1,
         WidgetArguments => {
             Description => 'Default catalog',    #loc
+            Default     => 1, # allow user to unset it on EditConfig.html
             Callback    => sub {
                 my $ret = { Values => [], ValuesLabel => {} };
                 my $c = RT::Catalogs->new( $HTML::Mason::Commands::session{'CurrentUser'} );

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list