Global default auto-refresh patch for 3.8.2

This patch is adapted from something Ian posted for 3.6.4 adapted for
3.8.2. Jesse, please consider adopting this for the mainline as it is
a popular question and this patch allows the person to override the
default.

— html/autohandler_orig 2009-02-12 11:31:49.000000000 -0800
+++ html/autohandler 2009-02-12 11:42:02.000000000 -0800
@@ -208,6 +208,13 @@
if defined $new_user_info->{$attribute};
}
$session{‘CurrentUser’}->Load($user);

  •            unless( $session{'home_refresh_interval'} ) {
    
  •                $session{'home_refresh_interval'} =  
    

$RT::HomeRefreshInterval;

  •            }
    
  •            unless( $session{'tickets_refresh_interval'} ) {
    
  •                $session{'tickets_refresh_interval'} =  
    

$RT::TicketsRefreshInterval;

  •            }
            }
            else {
    

@@ -273,6 +280,13 @@
$m->abort;
}
$session{‘CurrentUser’} = $user_obj;

  •    unless( $session{'home_refresh_interval'} ) {
    
  •        $session{'home_refresh_interval'} =  
    

$RT::HomeRefreshInterval;

  •    }
    
  •    unless( $session{'tickets_refresh_interval'} ) {
    
  •        $session{'tickets_refresh_interval'} =  
    

$RT::TicketsRefreshInterval;

  •    }
        $RT::Logger->info(
            "Successful login for $user from $ENV{'REMOTE_ADDR'}");
        $m->callback( %ARGS, CallbackName => 'SuccessfulLogin' );
    

Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source
and other randomness

This patch is adapted from something Ian posted for 3.6.4 adapted
for 3.8.2. Jesse, please consider adopting this for the mainline as
it is a popular question and this patch allows the person to
override the default.

Since 3.8 added user level preferences, this really looks like
something which is
better handled as a user preference. RT::Config has docs about
adding items
to %META and marking them as user overridable. It would also want some
changes and docs for RT_Config.pm because you could set a global default
(default would be 0)

-kevin

This patch is adapted from something Ian posted for 3.6.4 adapted
for 3.8.2. Jesse, please consider adopting this for the mainline as
it is a popular question and this patch allows the person to
override the default.

Since 3.8 added user level preferences, this really looks like
something which is
better handled as a user preference. RT::Config has docs about
adding items
to %META and marking them as user overridable. It would also want
some
changes and docs for RT_Config.pm because you could set a global
default
(default would be 0)

Are you saying that you guys will implement it that way for a later
version? Or is this a request for a patch to implement these things?

Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source
and other randomness

This patch is adapted from something Ian posted for 3.6.4 adapted
for 3.8.2. Jesse, please consider adopting this for the mainline as
it is a popular question and this patch allows the person to
override the default.

Since 3.8 added user level preferences, this really looks like
something which is
better handled as a user preference. RT::Config has docs about
adding items
to %META and marking them as user overridable. It would also want
some
changes and docs for RT_Config.pm because you could set a global
default
(default would be 0)

Are you saying that you guys will implement it that way for a later
version? Or is this a request for a patch to implement these things?

That was a suggestion of how to make the patch better and more
compatible with 3.8

I wouldn’t apply any patch that adds two new Config variables without
documenting
them and adding defaults to the shipped config file.

-kevin

Letting the user change the value of the refresh for themselves is not a bad
thing but neither is having a non-zero default for the entire installation.
I very much would have liked to be able to set a non-zero default for the
page refresh for the installation, the options I have seen and tried cause
breakage of the system and require each user to change the preference each
time they login to the system. I do agree that undocumented additions and
variables are bad but it would be very nice if both options were available.

JamesOn Thu, Feb 12, 2009 at 12:27 PM, Kevin Falcone falcone@bestpractical.comwrote:

On Feb 12, 2009, at 3:19 PM, Jo Rhett wrote:

On Feb 12, 2009, at 2:43 PM, Jo Rhett wrote:

This patch is adapted from something Ian posted for 3.6.4 adapted
for 3.8.2. Jesse, please consider adopting this for the mainline as
it is a popular question and this patch allows the person to
override the default.

On Feb 12, 2009, at 12:12 PM, Kevin Falcone wrote:

Since 3.8 added user level preferences, this really looks like
something which is
better handled as a user preference. RT::Config has docs about
adding items
to %META and marking them as user overridable. It would also want
some
changes and docs for RT_Config.pm because you could set a global
default
(default would be 0)

Are you saying that you guys will implement it that way for a later
version? Or is this a request for a patch to implement these things?

That was a suggestion of how to make the patch better and more
compatible with 3.8

I wouldn’t apply any patch that adds two new Config variables without
documenting
them and adding defaults to the shipped config file.

-kevin


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Letting the user change the value of the refresh for themselves is
not a bad thing but neither is having a non-zero default for the
entire installation. I very much would have liked to be able to set
a non-zero default for the page refresh for the installation, the
options I have seen and tried cause breakage of the system and
require each user to change the preference each time they login to
the system. I do agree that undocumented additions and variables
are bad but it would be very nice if both options were available.

My point was that the installation default should continue to be 0 in
order to be
backwards compatible.

If such a patch were to be produced, I would be happy to consider it
for inclusion
in a future 3.8 release.

-kevin