[rt-devel] RT2 bugs and comments
Arthur de Jong
arthur at West.NL
Mon Mar 26 09:16:49 EST 2001
As promised more bug(fixes) and comments. I hope RT2 will be stable quick
so we can take it into production.
First of all my Date patch didn't get through quite right. The patch for
editing dates was against two files and only one got partly through
resulting in wrong output. My Elements/SelectDate and
Ticket/Elements/EditDates files are attached.
I modified several files (Ticket/Elements/EditPeople,
Ticket/Elements/EditWatchers, Ticket/Elements/ShowPeople and
Ticket/Update.html) to show the Cc's and AdminCc's for the queue alongside
the list of Cc's and AdminCc's for the ticket. I did a grep on all the
files and I think these are all the files displaying this info. See
attached files for my version of the file.
The "Open tickets (from listing) in seperate window" and "Display each
ticket in its own window" in the Preferences do not seem to work. When I
select a checkbox and press "Submit" the value is not saved. The checkboxes
in the resulting page are not selected and I cannot detect any change in
function of RT (on which page should there be any change anyway?).
On Administration->Queues->Watchers (Admin/Queues/People.html) there is a
link per user to Admin/Users/Display.html that does not exist. Shouldn't
that be Admin/Users/Modify.html?
A problem: There is no easy way to add an email address as Cc to a ticket
(using the Web interface) when that email address does not belong to a
registered user.
All the modifications listed above can also be found in 1 patchfile
(bigpatch).
-- arthur de jong - arthur at west.nl - west consulting b.v. --
-------------- next part --------------
<INPUT NAME="<%$Name%>" VALUE="<%$Default%>" size=16>
<%init>
unless ((defined $Default) or
($current <= 0)) {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($current);
$Default = sprintf("%04d-%02d-%02d %02d:%02d",
$year+1900,$mon+1,$mday,
$hour,$min);
}
unless ($Name) {
$Name = $menu_prefix. "_Date";
}
</%init>
<%args>
$ShowTime => undef
$menu_prefix=>''
$current=>time
$Default => undef
$Name => undef
</%args>
-------------- next part --------------
<TABLE>
<TD>
Starts:
</TD>
<TD>
<& /Elements/SelectDate, menu_prefix => 'Starts', current => $TicketObj->StartsObj->Unix &>
(<% $TicketObj->StartsObj->AsString %>)
</TD>
</TR>
<TR>
<TD>
Started:
</TD>
<TD>
<& /Elements/SelectDate, menu_prefix => 'Started', current => $TicketObj->StartedObj->Unix &>
(<%$TicketObj->StartedObj->AsString %>)
</TD>
</TR>
<TR>
<TD>
Last Contact:
</TD>
<TD>
<& /Elements/SelectDate, menu_prefix => 'Told', current => $TicketObj->ToldObj->Unix &>
(<% $TicketObj->ToldObj->AsString %>)
</TD>
</TR>
<TR>
<TD>
Due:
</TD>
<TD>
<& /Elements/SelectDate, menu_prefix => 'Due', current => $TicketObj->DueObj->Unix &>
(<% $TicketObj->DueObj->AsString %>)
</TD>
</TR>
</TABLE>
<%ARGS>
$TicketObj => undef
</%ARGS>
-------------- next part --------------
<TABLE>
<TR>
<TD VALIGN=TOP>
<h3>Owner</h3>
Owner: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, Default => $Ticket->OwnerObj->Id &>
<h3>New watchers</h3>
Find people whose<BR>
<& /Elements/SelectUsers &>
<& AddWatchers, Ticket => $Ticket, UserString => $UserString,
UserOp => $UserOp, UserField => $UserField &>
</TD><TD VALIGN=TOP>
<h3>Current watchers</h3>
(Check box to delete)<br>
Requestors:
<& EditWatchers, TicketObj => $Ticket, Type => 'requestors' &>
Cc:
<& EditWatchers, TicketObj => $Ticket, Type => 'cc' &>
Administrative Cc:
<& EditWatchers, TicketObj => $Ticket, Type => 'admincc' &>
Queue Cc:
<& EditWatchers, TicketObj => $Ticket, Type => 'queuecc' &>
Queue Admin Cc:
<& EditWatchers, TicketObj => $Ticket, Type => 'queueadmincc' &>
</TD>
</TR>
</TABLE>
<%ARGS>
$UserField => undef
$UserOp => undef
$UserString => undef
$Ticket => undef
</%ARGS>
-------------- next part --------------
%# $Header: /raid/cvsroot/rt/webrt/Ticket/Elements/Attic/EditWatchers,v 1.1.2.3 2001/03/09 20:15:29 jesse Exp $
%# Copyright 1996-2000 Jesse Vincent <jesse at fsck.com>
<ul>
%# Print out a placeholder if there are none.
%if ($watchers->Count == 0 ) {
<li><i>none</i>
% }
%while (my $watcher=$watchers->Next) {
<li>
%if ($deletable) {
<INPUT TYPE=CHECKBOX NAME="DelWatcher<%$watcher->id%>" UNCHECKED>
%}
%#If there's a principal backing this user, lets give a link to their
%# account
%if ($watcher->IsUser) {
<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->OwnerObj->id%>">
<%$watcher->OwnerObj->RealName%></a>:
%} else {
Email address:
%}
<i><%$watcher->Email%></i>
%}
</ul>
<%INIT>
my ($watchers, $watcher, $set, $deletable);
$deletable = 1;
if ($Type =~ /^request/i) {
$watchers = $TicketObj->Requestors;
}
elsif ($Type =~ /^admincc/i) {
$watchers = $TicketObj->AdminCc;
}
elsif ($Type =~ /^cc/i) {
$watchers = $TicketObj->Cc;
}
elsif ($Type =~ /^queueadmincc/i) {
$watchers = $TicketObj->QueueObj->AdminCc;
$deletable = 0;
}
elsif ($Type =~ /^queuecc/i) {
$watchers = $TicketObj->QueueObj->Cc;
$deletable = 0;
}
else { $watchers = $TicketObj->Watchers;
}
</%INIT>
<%ARGS>
$TicketObj => undef
$Type => undef
</%ARGS>
-------------- next part --------------
Owner<BR>
<B><%$Ticket->OwnerObj->Name%></B><BR>
Requestors<BR>
<B><%$Ticket->RequestorsAsString%></B><BR>
Cc<BR>
<B><% join(", ",($Ticket->CcAsString,$Ticket->QueueObj->CcAsString)) %></B><BR>
AdminCc<BR>
<B><% join(", ",($Ticket->AdminCcAsString,$Ticket->QueueObj->AdminCcAsString)) %></B>
<%ARGS>
$Ticket => undef
</%ARGS>
-------------- next part --------------
<& /Elements/Header, Title=>"Update Ticket ".$Ticket->Id.": ".$Ticket->Subject &>
<& /Ticket/Elements/Tabs, Ticket => $Ticket &>
<& /Elements/TitleBoxStart, title => 'Update ticket '.$Ticket->Id &>
<FORM ACTION="Display.html" METHOD=POST>
<TABLE>
<TR>
<TD VALIGN=TOP ALIGN=RIGHT>Interested Parties
</TD>
<TD>
<ul>
<li> Requestor: <% $Ticket->RequestorsAsString %>
<li> Cc: <% join(", ",($Ticket->CcAsString,$Ticket->QueueObj->CcAsString)) %>
<li> AdminCc: <% join(", ",($Ticket->AdminCcAsString,$Ticket->QueueObj->AdminCcAsString)) %>
</ul>
</TD>
</TR>
</TABLE>
Status:
<& /Elements/SelectStatus, Name=>"SetStatus", Default => $Ticket->Status() &>
Owner:
<& /Elements/SelectOwner, Name=>"SetOwner", Default => $Ticket->OwnerObj->Id(), Queue => $Ticket->QueueObj &>
Time Worked:
<input size=4 name="UpdateTimeWorked"> minutes<br>
<hr>
Update Type: <select name="UpdateType">
<option value="private" <%$CommentDefault%>>Comments (Not sent to requestors)</option>
<option value="response" <%$ResponseDefault%>>Response to requestors</option>
</select>
<br>
Subject: <input name="UpdateSubject" size=60 value="Re: <% $Ticket->Subject %>"> <br>
<& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>"><br>
<& /Elements/TitleBoxEnd &>
<& /Elements/Submit &>
</FORM>
<%INIT>
## Things needed in the template - we'll do the processing here, just
## for the convinience:
my $CommentDefault=$Action eq "Comment" ? "SELECTED" : "";
my $ResponseDefault=$Action eq "Respond" ? "SELECTED" : "";
use RT::Ticket;
my $Ticket=RT::Ticket->new($session{'CurrentUser'});
$Ticket->Load($id) || Abort ("Couldn't load ticket.");
</%INIT>
<%ARGS>
$id => undef
$Action => undef
</%ARGS>
-------------- next part --------------
diff -Naur WebRT.1-3-62/html/Elements/SelectDate WebRT/html/Elements/SelectDate
--- WebRT.1-3-62/html/Elements/SelectDate Mon Mar 26 11:49:55 2001
+++ WebRT/html/Elements/SelectDate Mon Mar 26 12:15:53 2001
@@ -5,8 +5,6 @@
($current <= 0)) {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($current);
- $mon++;
- $year+=1900;
$Default = sprintf("%04d-%02d-%02d %02d:%02d",
$year+1900,$mon+1,$mday,
diff -Naur WebRT.1-3-62/html/Ticket/Elements/EditDates WebRT/html/Ticket/Elements/EditDates
--- WebRT.1-3-62/html/Ticket/Elements/EditDates Mon Mar 26 11:50:00 2001
+++ WebRT/html/Ticket/Elements/EditDates Mon Mar 26 12:11:10 2001
@@ -3,7 +3,7 @@
Starts:
</TD>
<TD>
-<& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &>
+<& /Elements/SelectDate, menu_prefix => 'Starts', current => $TicketObj->StartsObj->Unix &>
(<% $TicketObj->StartsObj->AsString %>)
</TD>
</TR>
@@ -12,7 +12,8 @@
Started:
</TD>
<TD>
-<& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)
+<& /Elements/SelectDate, menu_prefix => 'Started', current => $TicketObj->StartedObj->Unix &>
+ (<%$TicketObj->StartedObj->AsString %>)
@@ -24,7 +25,8 @@
Last Contact:
</TD>
<TD>
-<& /Elements/SelectDate, menu_prefix => 'Told', current => 0 &> (<% $TicketObj->ToldObj->AsString %>)
+<& /Elements/SelectDate, menu_prefix => 'Told', current => $TicketObj->ToldObj->Unix &>
+ (<% $TicketObj->ToldObj->AsString %>)
</TD>
</TR>
@@ -34,7 +36,8 @@
</TD>
<TD>
-<& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>)
+<& /Elements/SelectDate, menu_prefix => 'Due', current => $TicketObj->DueObj->Unix &>
+ (<% $TicketObj->DueObj->AsString %>)
</TD>
</TR>
diff -Naur WebRT.1-3-62/html/Ticket/Elements/EditPeople WebRT/html/Ticket/Elements/EditPeople
--- WebRT.1-3-62/html/Ticket/Elements/EditPeople Mon Mar 26 11:50:01 2001
+++ WebRT/html/Ticket/Elements/EditPeople Mon Mar 26 14:13:56 2001
@@ -25,6 +25,12 @@
Administrative Cc:
<& EditWatchers, TicketObj => $Ticket, Type => 'admincc' &>
+Queue Cc:
+<& EditWatchers, TicketObj => $Ticket, Type => 'queuecc' &>
+
+Queue Admin Cc:
+<& EditWatchers, TicketObj => $Ticket, Type => 'queueadmincc' &>
+
</TD>
</TR>
</TABLE>
@@ -34,4 +40,4 @@
$UserOp => undef
$UserString => undef
$Ticket => undef
-</%ARGS>
\ No newline at end of file
+</%ARGS>
diff -Naur WebRT.1-3-62/html/Ticket/Elements/EditWatchers WebRT/html/Ticket/Elements/EditWatchers
--- WebRT.1-3-62/html/Ticket/Elements/EditWatchers Mon Mar 26 11:50:00 2001
+++ WebRT/html/Ticket/Elements/EditWatchers Mon Mar 26 16:03:10 2001
@@ -11,7 +11,9 @@
%while (my $watcher=$watchers->Next) {
<li>
+%if ($deletable) {
<INPUT TYPE=CHECKBOX NAME="DelWatcher<%$watcher->id%>" UNCHECKED>
+%}
%#If there's a principal backing this user, lets give a link to their
%# account
%if ($watcher->IsUser) {
@@ -24,16 +26,25 @@
%}
</ul>
<%INIT>
-my ($watchers, $watcher, $set);
+my ($watchers, $watcher, $set, $deletable);
+$deletable = 1;
if ($Type =~ /^request/i) {
$watchers = $TicketObj->Requestors;
}
-elsif ($Type =~ /^admin/i) {
+elsif ($Type =~ /^admincc/i) {
$watchers = $TicketObj->AdminCc;
}
elsif ($Type =~ /^cc/i) {
$watchers = $TicketObj->Cc;
}
+elsif ($Type =~ /^queueadmincc/i) {
+ $watchers = $TicketObj->QueueObj->AdminCc;
+ $deletable = 0;
+ }
+elsif ($Type =~ /^queuecc/i) {
+ $watchers = $TicketObj->QueueObj->Cc;
+ $deletable = 0;
+ }
else { $watchers = $TicketObj->Watchers;
}
</%INIT>
@@ -41,6 +52,3 @@
$TicketObj => undef
$Type => undef
</%ARGS>
-
-
-
diff -Naur WebRT.1-3-62/html/Ticket/Elements/ShowPeople WebRT/html/Ticket/Elements/ShowPeople
--- WebRT.1-3-62/html/Ticket/Elements/ShowPeople Mon Mar 26 11:50:01 2001
+++ WebRT/html/Ticket/Elements/ShowPeople Mon Mar 26 15:39:10 2001
@@ -3,9 +3,9 @@
Requestors<BR>
<B><%$Ticket->RequestorsAsString%></B><BR>
Cc<BR>
- <B><%$Ticket->CcAsString%></B><BR>
+ <B><% join(", ",($Ticket->CcAsString,$Ticket->QueueObj->CcAsString)) %></B><BR>
AdminCc<BR>
- <B><%$Ticket->AdminCcAsString%></B>
+ <B><% join(", ",($Ticket->AdminCcAsString,$Ticket->QueueObj->AdminCcAsString)) %></B>
<%ARGS>
$Ticket => undef
</%ARGS>
diff -Naur WebRT.1-3-62/html/Ticket/Update.html WebRT/html/Ticket/Update.html
--- WebRT.1-3-62/html/Ticket/Update.html Mon Mar 26 11:49:59 2001
+++ WebRT/html/Ticket/Update.html Mon Mar 26 15:36:42 2001
@@ -12,8 +12,8 @@
<TD>
<ul>
<li> Requestor: <% $Ticket->RequestorsAsString %>
-<li> Cc: <% $Ticket->CcAsString %>
-<li> AdminCc: <% $Ticket->AdminCcAsString %>
+<li> Cc: <% join(", ",($Ticket->CcAsString,$Ticket->QueueObj->CcAsString)) %>
+<li> AdminCc: <% join(", ",($Ticket->AdminCcAsString,$Ticket->QueueObj->AdminCcAsString)) %>
</ul>
</TD>
</TR>
More information about the Rt-devel
mailing list