[rt-users] Reducing noise in ticket history

D.J.Rickard at brighton.ac.uk D.J.Rickard at brighton.ac.uk
Tue Jun 26 09:48:11 EDT 2007


Thanks, I'll see how that works on our install. 


 
David Rickard

-----Original Message-----
From: Toby Darling [mailto:darling at ccdc.cam.ac.uk] 
Sent: 26 June 2007 10:10
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Reducing noise in ticket history



Stefan Hornburg wrote:
> Toby Darling wrote:
>> Hi David
>>
>>> I created a thread about this in April, suggesting the history could
be
>>> collapsed.  I think there was a feeling it could be done and was
>>> desirable, but it would need someone with the time and ability to
carry
>>> it out.
>>
>> I've got a trivial (4 line) change to 
>> html/Ticket/Elements/ShowTransaction that implements this, using the 
>> existing javascript 'onClick="hideshow...' that's used to hide/show 
>> the tabs, but its based on a 3.4.1 installation. I've no idea what's 
>> required to port this to 3.6.x. Let me know if you'd like details.
> 
> Well, i would like to see details :-) as this would be a very nice
feature.

No problem. Sorry, it's a tad more involved than I remembered ...

These are diffs between /usr/share/request-tracker3.4/ and 
/usr/local/share/request-tracker3.4/ so lines starting '<' are original,

'>' are mine. I'm sure there are better / cleaner solutions, but this 
works for us.

html/Elements/Header:

65a66
 >     document.getElementById(idstring).scrollIntoView(true);
71,78c72,79
< % if ($Focus) {
< ONLOAD="
<     var tmp = (document.getElementsByName('<% $Focus %>'));
<     if (tmp.length > 0) tmp[tmp.length-1].focus();
< "
< % }
< >
< <table width="100%" border="0" cellspacing="0" cellpadding="0" 
bgcolor="#FFFFFF">
---
 > %# if ($Focus) {
 > %#ONLOAD="
 > %#var tmp = (document.getElementsByName('<% $Focus %>'));
 > %#if (tmp.length > 0) tmp[tmp.length-1].focus();
 > %#"
 > %#% }
 > %#>
 > <table width="100%" border="0" cellspacing="0" cellpadding="0" 
background="<%$RT::WebImagesURL%>/backg.gif">



html/Ticket/Elements/ShowTransaction:

47c47
< <TD rowspan="2" valign="top" bgcolor="<%$bgcolor%>"><A 
NAME="txn-<%$Transaction->Id%>" href="#txn-<%$Transaction->Id%>">#</A><%

$LastTransaction ? '<a name="lasttrans"> </a>' : ' ' |n
%></TD>
---
 > <TD rowspan="2" valign="top" bgcolor="<%$bgcolor%>"><A 
NAME="txn-<%$Transaction->Id%>" href="#txn-<%$Transaction->Id%>" 
onClick="hideshow('<%$id%>')">#</A><% $LastTransaction ? '<a 
name="lasttrans"> </a>' : ' ' |n %></TD>
54a55
 >
58c59
< <TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>"><TD colspan=5>
---
 > <TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>"><TD 
id="element-<%$id%>" colspan=5>
74a76
 > $DisplayPath => $RT::WebPath."/Ticket/Display.html"
85c87
<
---
 > my $id = rand(2000);
.....




More information about the rt-users mailing list