-my $id = $Ticket->id;
-my $url = RT->Config->Get('WebPath') ."/Helpers/TicketHistory?id=". $id;
-my $display = RT->Config->Get('WebPath') ."/Ticket/Display.html?id=$id;ForceShowHistory=1";
+my %params = %ARGS;
+delete $params{Ticket};
+
+my $query = $m->comp('/Elements/QueryString', %params, id => $Ticket->id );
+my $url = RT->Config->Get('WebPath')."/Helpers/TicketHistory?$query";
+my $display = RT->Config->Get('WebPath')."/Ticket/Display.html?ForceShowHistory=1;$query";