System-wide Default Refresh Rate

Hey all,

I’m trying to figure out how to change the default refresh rate for all pages
that utilize the refresh option. Under html/Elements is the Refresh file. This
provides the code I’m looking for as far as I can tell. However, I can’t get it
to work.

I’ve changed it so that $Default is 120 ($Default => 120) but that doesn’t
affect anything. I’d rather not have to make the change in every file so I’m
hoping this solution can be made to work.

I have the Devel-Mode option set in RT_SiteConfig.pm so I know it isn’t a mason
cache issue. Besides that, I’ve actually looked at var/mason-data/cache and
found nothing. Anyone know why changing the $Default variable to what I want it
to be won’t work?

Mathew

Keep up with me and what I’m up to: http://theillien.blogspot.com

Hi Mathew,

I don’t remember where I found this, maybe in the list archives, but you
need to modify the Elements/Login file and insert one line that adds the
default value to the login form submission:

<&|/l&>Password: +

~JasonOn Thu, 2007-07-12 at 06:07 -0400, Mathew Snyder wrote:

Hey all,

I’m trying to figure out how to change the default refresh rate for all pages
that utilize the refresh option. Under html/Elements is the Refresh file. This
provides the code I’m looking for as far as I can tell. However, I can’t get it
to work.

I’ve changed it so that $Default is 120 ($Default => 120) but that doesn’t
affect anything. I’d rather not have to make the change in every file so I’m
hoping this solution can be made to work.

I have the Devel-Mode option set in RT_SiteConfig.pm so I know it isn’t a mason
cache issue. Besides that, I’ve actually looked at var/mason-data/cache and
found nothing. Anyone know why changing the $Default variable to what I want it
to be won’t work?

Mathew

Mathew Snyder wrote:

Hey all,

I’m trying to figure out how to change the default refresh rate for all pages
that utilize the refresh option. Under html/Elements is the Refresh file. This
provides the code I’m looking for as far as I can tell. However, I can’t get it
to work.

I’ve changed it so that $Default is 120 ($Default => 120) but that doesn’t
affect anything. I’d rather not have to make the change in every file so I’m
hoping this solution can be made to work.

I have the Devel-Mode option set in RT_SiteConfig.pm so I know it isn’t a mason
cache issue. Besides that, I’ve actually looked at var/mason-data/cache and
found nothing. Anyone know why changing the $Default variable to what I want it
to be won’t work?

Mathew

Has anyone been able to come up with a solution for this?

Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com

Hi Mathew,

I’m trying to figure out how to change the default refresh rate for all pages
that utilize the refresh option. Under html/Elements is the Refresh file. This
provides the code I’m looking for as far as I can tell. However, I can’t get it
to work.

Has anyone been able to come up with a solution for this?

I use a patch on RT 3.4.5 taken from the LDAP overlay. Details here:

http://www.lancs.ac.uk/~norton/dev/rt/notes.html#20050506__system_wide_configurable_default_refresh_periods

Regards, Ian.

Ian Norton wrote:

Hi Mathew,

I’m trying to figure out how to change the default refresh rate for
all pages
that utilize the refresh option. Under html/Elements is the Refresh
file. This
provides the code I’m looking for as far as I can tell. However, I
can’t get it
to work.

Has anyone been able to come up with a solution for this?

I use a patch on RT 3.4.5 taken from the LDAP overlay. Details here:

http://www.lancs.ac.uk/~norton/dev/rt/notes.html#20050506__system_wide_configurable_default_refresh_periods

Regards, Ian.

Sadly, this won’t work for the 3.6 branch autohandler. :frowning: HomeRefreshPeriod
isn’t found anywhere in it. Heck, I can’t seem to find it anywhere using grep.
I know it’s there somewhere though.

Keep up with me and what I’m up to: http://theillien.blogspot.com

Hi Mathew,

Sadly, this won’t work for the 3.6 branch autohandler. :frowning: HomeRefreshPeriod
isn’t found anywhere in it. Heck, I can’t seem to find it anywhere using grep.
I know it’s there somewhere though.

You did apply the patch, didn’t you? By the looks of it, the patch
fails against the 3.6.4 source I just untarred to check it against.
Here’s an updated version:

--- html/autohandler 2007-04-24 18:21:42.000000000 +0100 +++ html/autohandler 2007-07-15 15:05:40.000000000 +0100 @@ -196,6 +196,8 @@ if ( defined $new_user_info->{$attribute} ); } $session{'CurrentUser'}->Load($user); + $session{'home_refresh_interval'} = $RT::HomeRefreshPeriod; + $session{'tickets_refresh_interval'} = $RT::TicketsRefreshPeriod; } else {

@@ -243,6 +245,8 @@
if ( !$session{‘CurrentUser’} && defined $user && defined $pass ) {
$session{‘CurrentUser’} = RT::CurrentUser->new();
$session{‘CurrentUser’}->Load($user);

  • $session{‘home_refresh_interval’} = $RT::HomeRefreshPeriod;

  • $session{‘tickets_refresh_interval’} = $RT::TicketsRefreshPeriod;

    unless ( $session{‘CurrentUser’}->id
    && $session{‘CurrentUser’}->IsPassword($pass) )

The HomeRefreshPeriod variable won’t appear in the source until the
patch is applied.

Regards, Ian.

Ian Norton wrote:

Hi Mathew,

Sadly, this won’t work for the 3.6 branch autohandler. :frowning:
HomeRefreshPeriod
isn’t found anywhere in it. Heck, I can’t seem to find it anywhere
using grep.
I know it’s there somewhere though.

You did apply the patch, didn’t you? By the looks of it, the patch
fails against the 3.6.4 source I just untarred to check it against.
Here’s an updated version:

--- html/autohandler 2007-04-24 18:21:42.000000000 +0100 +++ html/autohandler 2007-07-15 15:05:40.000000000 +0100 @@ -196,6 +196,8 @@ if ( defined $new_user_info->{$attribute} ); } $session{'CurrentUser'}->Load($user); + $session{'home_refresh_interval'} = $RT::HomeRefreshPeriod; + $session{'tickets_refresh_interval'} = $RT::TicketsRefreshPeriod; } else {

@@ -243,6 +245,8 @@
if ( !$session{‘CurrentUser’} && defined $user && defined $pass ) {
$session{‘CurrentUser’} = RT::CurrentUser->new();
$session{‘CurrentUser’}->Load($user);

  • $session{‘home_refresh_interval’} = $RT::HomeRefreshPeriod;
  • $session{‘tickets_refresh_interval’} = $RT::TicketsRefreshPeriod;
unless ( $session{'CurrentUser'}->id
    && $session{'CurrentUser'}->IsPassword($pass) )

The HomeRefreshPeriod variable won’t appear in the source until the
patch is applied.

Regards, Ian.

I added the lines listed, logged out and then logged in again to make sure the
session was reset. Still no system-wide change.

Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com

Don’t forget to add variables to RT_SiteConfig.pm.
Set($HomeRefreshPeriod, “300”);
Set($TicketsRefreshPeriod, “300”);

Mathew Snyder wrote:

Ian Norton wrote:

Hi Mathew,

Sadly, this won’t work for the 3.6 branch autohandler. :frowning:
HomeRefreshPeriod
isn’t found anywhere in it. Heck, I can’t seem to find it anywhere
using grep.
I know it’s there somewhere though.

You did apply the patch, didn’t you? By the looks of it, the patch
fails against the 3.6.4 source I just untarred to check it against.
Here’s an updated version:

--- html/autohandler 2007-04-24 18:21:42.000000000 +0100 +++ html/autohandler 2007-07-15 15:05:40.000000000 +0100 @@ -196,6 +196,8 @@ if ( defined $new_user_info->{$attribute} ); } $session{'CurrentUser'}->Load($user); + $session{'home_refresh_interval'} = $RT::HomeRefreshPeriod; + $session{'tickets_refresh_interval'} = $RT::TicketsRefreshPeriod; } else {

@@ -243,6 +245,8 @@
if ( !$session{‘CurrentUser’} && defined $user && defined $pass ) {
$session{‘CurrentUser’} = RT::CurrentUser->new();
$session{‘CurrentUser’}->Load($user);

  • $session{‘home_refresh_interval’} = $RT::HomeRefreshPeriod;
  • $session{‘tickets_refresh_interval’} = $RT::TicketsRefreshPeriod;
unless ( $session{'CurrentUser'}->id
    && $session{'CurrentUser'}->IsPassword($pass) )

The HomeRefreshPeriod variable won’t appear in the source until the
patch is applied.

Regards, Ian.

I added the lines listed, logged out and then logged in again to make sure the
session was reset. Still no system-wide change.

Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com


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

Drew Barnes
Applications Analyst
Network Resources Department
Raymond Walters College
University of Cincinnati

I am new to Scrips in RT.

Is it possible to compare the Owner of the the issue to the email address on
the email going out / coming in?

Is there a good Scrip How to book for RT? I got the Essentials book and it
was light on the API and specifically the use of the custom scrip syntax.

I only have use of the web interface to script a solution. Suggestions?

Thanks in advance,

-Mark Grob

Hi Mark,

At 08:06 AM 7/18/2007, Mark Grob wrote:

I am new to Scrips in RT.

Is it possible to compare the Owner of the the issue to the email address on
the email going out / coming in?

Sure. Within a scrip the comparison would be something like this:
my $MailFromOwner = $self->TransactionObj->Type eq ‘Correspond’
&& $self->TransactionObj->CreatorObj->Id == $self->TicketObj->Owner;

$MailFromOwner will be true if an incoming e-mail is from the ticket owner
and false otherwise. You could use this in a User Defined condition or
within a User Defined action within a scrip.

Is there a good Scrip How to book for RT? I got the Essentials book and it
was light on the API and specifically the use of the custom scrip syntax.

No, it’s mostly spending a lot of time in the wiki, trying out examples
from the book, then going back to the wiki and asking questions on this list.

I only have use of the web interface to script a solution. Suggestions?

The web interface should be all you need in most cases. Access to the
rt.log file will go a long way towards preventing premature aging when you
start debugging scrips.

Have fun!
Gene

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Ahhh…right. Didn’t do that. I’ll try it later tonight when I get to
work.

Keep up with my goings on at http://theillien.blogspot.com

Drew Barnes wrote:

Drew Barnes wrote:

Don’t forget to add variables to RT_SiteConfig.pm.
Set($HomeRefreshPeriod, “300”);
Set($TicketsRefreshPeriod, “300”);

Mathew Snyder wrote:

Ian Norton wrote:

Hi Mathew,

Sadly, this won’t work for the 3.6 branch autohandler. :frowning:
HomeRefreshPeriod
isn’t found anywhere in it. Heck, I can’t seem to find it anywhere
using grep.
I know it’s there somewhere though.

You did apply the patch, didn’t you? By the looks of it, the patch
fails against the 3.6.4 source I just untarred to check it against.
Here’s an updated version:

--- html/autohandler 2007-04-24 18:21:42.000000000 +0100 +++ html/autohandler 2007-07-15 15:05:40.000000000 +0100 @@ -196,6 +196,8 @@ if ( defined $new_user_info->{$attribute} ); } $session{'CurrentUser'}->Load($user); + $session{'home_refresh_interval'} = $RT::HomeRefreshPeriod; + $session{'tickets_refresh_interval'} = $RT::TicketsRefreshPeriod; } else {

@@ -243,6 +245,8 @@
if ( !$session{‘CurrentUser’} && defined $user && defined $pass ) {
$session{‘CurrentUser’} = RT::CurrentUser->new();
$session{‘CurrentUser’}->Load($user);

  • $session{‘home_refresh_interval’} = $RT::HomeRefreshPeriod;
  • $session{‘tickets_refresh_interval’} = $RT::TicketsRefreshPeriod;
unless ( $session{'CurrentUser'}->id
    && $session{'CurrentUser'}->IsPassword($pass) )

The HomeRefreshPeriod variable won’t appear in the source until the
patch is applied.

Regards, Ian.

I added the lines listed, logged out and then logged in again to make sure the
session was reset. Still no system-wide change.

Mathew

That didn’t work either. So far what I’ve done is to add the lines in the patch
above to my autohandler file. I’ve adjusted html/Elements/Refresh to point to a
default that isn’t 0. I’ve added the above lines to my RT_Siteconfig.pm file.

I’m beginning to think this is broken and until a major fix is made, it won’t
work without cobbled-together code.

Keep up with me and what I’m up to: http://theillien.blogspot.com

It is working fine for me, so perhaps there is some random conflict with
a local mod? Try removing the localized html/Elements/Refresh file. I
didn’t touch that on my install and everything is working. That was the
first mod I made on a clean 3.6.4 install though.

Mathew Snyder wrote:

Drew Barnes wrote:

Don’t forget to add variables to RT_SiteConfig.pm.
Set($HomeRefreshPeriod, “300”);
Set($TicketsRefreshPeriod, “300”);

Mathew Snyder wrote:

Ian Norton wrote:

Hi Mathew,

Sadly, this won’t work for the 3.6 branch autohandler. :frowning:
HomeRefreshPeriod
isn’t found anywhere in it. Heck, I can’t seem to find it anywhere
using grep.
I know it’s there somewhere though.

You did apply the patch, didn’t you? By the looks of it, the patch
fails against the 3.6.4 source I just untarred to check it against.
Here’s an updated version:

--- html/autohandler 2007-04-24 18:21:42.000000000 +0100 +++ html/autohandler 2007-07-15 15:05:40.000000000 +0100 @@ -196,6 +196,8 @@ if ( defined $new_user_info->{$attribute} ); } $session{'CurrentUser'}->Load($user); + $session{'home_refresh_interval'} = $RT::HomeRefreshPeriod; + $session{'tickets_refresh_interval'} = $RT::TicketsRefreshPeriod; } else {

@@ -243,6 +245,8 @@
if ( !$session{‘CurrentUser’} && defined $user && defined $pass ) {
$session{‘CurrentUser’} = RT::CurrentUser->new();
$session{‘CurrentUser’}->Load($user);

  • $session{‘home_refresh_interval’} = $RT::HomeRefreshPeriod;
  • $session{‘tickets_refresh_interval’} = $RT::TicketsRefreshPeriod;
unless ( $session{'CurrentUser'}->id
    && $session{'CurrentUser'}->IsPassword($pass) )

The HomeRefreshPeriod variable won’t appear in the source until the
patch is applied.

Regards, Ian.

I added the lines listed, logged out and then logged in again to make sure the
session was reset. Still no system-wide change.

Mathew

That didn’t work either. So far what I’ve done is to add the lines in the patch
above to my autohandler file. I’ve adjusted html/Elements/Refresh to point to a
default that isn’t 0. I’ve added the above lines to my RT_Siteconfig.pm file.

I’m beginning to think this is broken and until a major fix is made, it won’t
work without cobbled-together code.

Keep up with me and what I’m up to: http://theillien.blogspot.com

Drew Barnes
Applications Analyst
Network Resources Department
Raymond Walters College
University of Cincinnati