[rt-users] auto refresh dashboard after back in history

Raphaël MOUNEYRES raphael.mouneyres at sagemcom.com
Tue Nov 8 03:59:14 EST 2011


Hello list,

i'd like advice on the following method i've implemented wich is working 
99%, just missing the last step.
I've added a new Priority ColumnMap called PriorityArrows for our manager 
to be able to modify priorities rapidly while looking at a Dashboard 
during a meeting, without need to enter into ticket details.
It is looking like this (other icons are working well already) :

The arrows are href link pointing to an html page doing the priority 
modification, and this is working.
In this html page, i've added a javascript method to go back one page to 
the dashboardn this is working too.
BUT the dashboard has not been "refreshed" with the new value, as the page 
is cached (inside the browser?masoncache?).

So now i'd like to know if someone would have a hint to force refresh of 
dashboard page after back(), or any other idea.

I'm using RT 3.8, and here are the codes i've written :

 PriorityArrows => {
        title     => 'Priority', # loc
        attribute => 'Priority',
        value     => sub { 
            my $Ticket = shift;
            my $currentpriority = $Ticket->Priority;
            my @result;
            my $base_url = RT->Config->Get('WebPath');
            my $img_url = $base_url . '/NoAuth/images/';
            my $targetpriorityup = $currentpriority - 1;
            my $targetprioritydown = $currentpriority + 1;

            push (@result, \"<center>");
            if ($currentpriority>1) {
                push (@result, \"<a href=\"", $base_url, 
"/Ticket/MovePriority.html?id=", $Ticket->id, \"&sens=moins\">", \"<img 
src=\"", $img_url, "arrowup.gif", \"\">  ", \"</a><br>"); 
            }
            push (@result, $currentpriority, \"<BR>");
            push (@result, \"<a href=\"", $base_url, 
"/Ticket/MovePriority.html?id=", $Ticket->id, \"&sens=plus\">", \"<img 
src=\"", $img_url, "arrowdown.gif", \"\">  ", \"</a><br>"); 
            return @result;
        }
 
and the MovePriority.html page is as follows :

<%INIT>
  my $Ticket = LoadTicket($id);
  my $currentpriority = $Ticket->Priority;
  my $targetpriority = 0;
  if ($sens eq "plus") {
    $targetpriority = $currentpriority + 1;
  }
  elsif ($sens eq "moins") {
    $targetpriority = $currentpriority -1;
  }
  $Ticket->SetPriority($targetpriority);
</%INIT>

<script type="text/javascript">
history.back();
</script>

<%ARGS>
  $id => undef
  $sens => undef
  $origin => undef
</%ARGS>

Raphaël MOUNEYRES
#
" Ce courriel et les documents qui lui sont joints peuvent contenir des
informations confidentielles ou ayant un caractère privé. S'ils ne vous sont
pas destinés, nous vous signalons qu'il est strictement interdit de les
divulguer, de les reproduire ou d'en utiliser de quelque manière que ce
soit le contenu. Si ce message vous a été transmis par erreur, merci d'en
informer l'expéditeur et de supprimer immédiatement de votre système
informatique ce courriel ainsi que tous les documents qui y sont attachés."


                               ******

" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the
sender immediately and delete this e-mail and all attached documents
from your computer system."
#

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111108/616ab41e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 3188 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111108/616ab41e/attachment.gif>


More information about the rt-users mailing list