RT 3.6.1 Refactoring SelfService MyRequests

… here are the changes for /SelfService/index.html (Open Tickets) and
/SelfService/Closed.html.

–David

/SelfService/index.html

— share/html/SelfService/index.html 2006-06-19 18:44:04.000000000
-0400
+++ local/html/SelfService/index.html 2006-10-30 20:15:53.000000000
-0500
@@ -43,6 +43,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /SelfService/Elements/Header, Title => undef &>
+<& /SelfService/Elements/Header, Title => ‘Open Tickets’ &>

-<& /SelfService/Elements/MyRequests &>
+<& /SelfService/Elements/MyRequests, BaseURL => $RT::WebPath .
"/SelfService/?",

  •                                Page    => $Page &>
    

+<%ARGS>
+$Page => 1
+</%ARGS>

/SelfService/Closed.html

— share/html/SelfService/Closed.html 2006-06-19 18:44:04.000000000
-0400
+++ local/html/SelfService/Closed.html 2006-10-30 20:14:25.000000000
-0500
@@ -45,5 +45,10 @@
%# END BPS TAGGED BLOCK }}}
<& /SelfService/Elements/Header, Title => loc(‘Closed tickets’) &>

-<& /SelfService/Elements/MyRequests, status => [‘rejected’, ‘resolved’],
friendly_status =>
-loc(‘closed’) &>
+<& /SelfService/Elements/MyRequests, status => [‘rejected’,
‘resolved’],

  •                                 friendly_status => loc('closed'), 
    
  •                                BaseURL         => $RT::WebPath . 
    

“/SelfService/Closed.html?”,

  •                                Page            => $Page &>
    

+<%ARGS>
+$Page => 1
+</%ARGS>

The change basically uses the standard paginated listing of tickets from
/Elements/TicketList.

–David

— share/html/SelfService/Elements/MyRequests 2006-06-19
18:44:04.000000000 -0400
+++ local/html/SelfService/Elements/MyRequests 2006-10-30
20:21:19.000000000 -0500
@@ -44,41 +44,34 @@
%#
%# END BPS TAGGED BLOCK }}}
<&| /Widgets/TitleBox, title => $title &>
-


-
-
-
-
-
-
-% while (my $Ticket = $MyTickets->Next) {
-
-
-
-% }
-
<&|/l&>Subject</&> <&|/l&>Status</&> <&|/l&>Owner</&>

-<%$Ticket->Id%>:
<%$Ticket->Subject%>

-

-<%loc($Ticket->Status)%>
-

-<%$Ticket->OwnerObj->Name%>
-

+<& /Elements/TicketList, Title => $title,
  •                    Format  => @Format, 
    
  •                    Query   => $Query, 
    
  •                    Order   => $Order, 
    
  •                    OrderBy => $OrderBy,
    
  •                    BaseURL => $BaseURL,
    
  •                    Page    => $Page &>
    

</&>
<%INIT>
$title ||= loc(“My [_1] tickets”, $friendly_status);
-my $MyTickets;
-$MyTickets = new RT::Tickets ($session{‘CurrentUser’});
-$MyTickets->LimitWatcher(TYPE => ‘Requestor’, VALUE =>
$session{‘CurrentUser’}->EmailAddress);
-$MyTickets->OrderBy(FIELD => ‘id’, ORDER => ‘ASC’);
-foreach my $status (@status) {

  •    $MyTickets->LimitStatus(VALUE => $status);
    

+my $Query = “Requestor = '” . $session{‘CurrentUser’}->EmailAddress .
"’";
+if (@status) {

  • $Query .= " AND ( Status = '";
  • $Query .= join “’ OR Status = '”, @status;
  • $Query .= “’)”;
    }
    +my $Order = “ASC”;
    +my $OrderBy = “Created”;
    +my @Format = qq{
  • id/TITLE:#’,
  • Subject/TITLE:Subject’,
  • Status,
  • OwnerName};
    </%INIT>
    <%ARGS>
    $title => undef
    $friendly_status => loc(‘open’)
    @status => (‘open’, ‘new’, ‘stalled’)
    +$BaseURL => undef
    +$Page => 1
    </%ARGS>

Could you please resend your patches as attachments? Including them
inline lets mail clients do horrible things, like wordwrap them,
breaking the patches :wink:

Thanks!
JesseOn Fri, Nov 03, 2006 at 06:11:34PM -0500, David Chandek-Stark wrote:

… here are the changes for /SelfService/index.html (Open Tickets) and
/SelfService/Closed.html.

–David

/SelfService/index.html

— share/html/SelfService/index.html 2006-06-19 18:44:04.000000000
-0400
+++ local/html/SelfService/index.html 2006-10-30 20:15:53.000000000
-0500
@@ -43,6 +43,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /SelfService/Elements/Header, Title => undef &>
+<& /SelfService/Elements/Header, Title => ‘Open Tickets’ &>

-<& /SelfService/Elements/MyRequests &>
+<& /SelfService/Elements/MyRequests, BaseURL => $RT::WebPath .
“/SelfService/?”,

  •                                Page    => $Page &>
    

+<%ARGS>
+$Page => 1
+</%ARGS>

/SelfService/Closed.html

— share/html/SelfService/Closed.html 2006-06-19 18:44:04.000000000
-0400
+++ local/html/SelfService/Closed.html 2006-10-30 20:14:25.000000000
-0500
@@ -45,5 +45,10 @@
%# END BPS TAGGED BLOCK }}}
<& /SelfService/Elements/Header, Title => loc(‘Closed tickets’) &>

-<& /SelfService/Elements/MyRequests, status => [‘rejected’, ‘resolved’],
friendly_status =>
-loc(‘closed’) &>
+<& /SelfService/Elements/MyRequests, status => [‘rejected’,
‘resolved’],

  •                                 friendly_status => loc('closed'), 
    
  •                                BaseURL         => $RT::WebPath . 
    

“/SelfService/Closed.html?”,

  •                                Page            => $Page &>
    

+<%ARGS>
+$Page => 1
+</%ARGS>


List info: The rt-devel Archives

Could you please resend your patches as attachments? Including them
inline lets mail clients do horrible things, like wordwrap them,
breaking the patches :wink:

Surely a better fix would be for you to switch to an MUA that doesn’t
gratuitiously wordwrap mail? (Yes, I checked. The message bearing the
patches had a Content-Type: not marked format=flowed - it was not
marked as appropriate for wordwrapping - making any wordwrapping that
was done to it gratuitious.)

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

Could you please resend your patches as attachments? Including them
inline lets mail clients do horrible things, like wordwrap them,
breaking the patches :wink:

Surely a better fix would be for you to switch to an MUA that doesn’t
gratuitiously wordwrap mail? (Yes, I checked. The message bearing the
patches had a Content-Type: not marked format=flowed - it was not
marked as appropriate for wordwrapping - making any wordwrapping that
was done to it gratuitious.)

Well, I’m presuming that you mean me, since that’s how the quote
attribution read. The problem is pretty clearly at Mailman or further
down the line. (I’d sort of suspect the Notes server. But blaming Notes
is a bit too easy. Sort of like dynamite-fishing in an aquarium).

David’s doing a good thing for everybody by creating patches. Getting
the patches as attachments, rather than inline in the body makes the
workflow for anyone applying them a lot easier. Suggesting that
someone switch MUAs because the MUA has wonky wordwrapping is kind of a
big hammer.

[Off topic, I’m looking for a good mail client for dealing with large
volumes of mail that allows fast searching over the full text of all
messages, works well in a ‘disconnected’ mode and isn’t Mail.app,
Thunderbird, Mutt, Eudora, Mulberry, Evolution, mutt, pine or Gnus.
Though, to try to avoid the inevitable, I’m going to suggest that any
discussion of the relative merits of mail clients be over frosty
beverages. (Absolute recommendations, on the other hand, would be
wondeful. :wink: ]

Including [patches] inline lets mail clients do horrible things,
like wordwrap them, breaking the patches :wink:
Surely a better fix would be for you to switch to an MUA that
doesn’t gratuitiously wordwrap mail?
The problem is pretty clearly at Mailman or further down the line.

Eww. I’ve now looked in a bit more detail, and it would appear there
are at least two problems involved.

The original patches, for example, began (in my mailbox, which has a
history of preserving messages exactly as received) with

— share/html/SelfService/Elements/MyRequests 2006-06-19
18:44:04.000000000 -0400
+++ local/html/SelfService/Elements/MyRequests 2006-10-30
20:21:19.000000000 -0500

(which is four lines, and anyone who doesn’t see it that way needs an
MUA fix, since this message is also not being marked wordwrappable).

But your quote of it says

— share/html/SelfService/index.html 2006-06-19 18:44:04.000000000
-0400
+++ local/html/SelfService/index.html 2006-10-30 20:15:53.000000000
-0500

(again, four lines) which makes me think your MUA rewordwrapped it!
So I now suspect both you and the OP need MUA work.

David’s doing a good thing for everybody by creating patches.
Getting the patches as attachments, rather than inline in the body
makes the workflow for anyone applying them a lot easier.

Well, not “anyone”; it wouldn’t for me. Extracting the attachments
from the message is a nontrivial (albeit relatively small) additional
bit of work. (If they aren’t encoded quoted-unprintable or base-64,
this isn’t needed, but that isn’t true nearly as often as I’d like, and
I’d need to check, also a small but nontrivial task.)

Not that my own experience should necessarily guide people creating
patches, of course, especially since I’m unlikely to be doing much with
patches coming across this list. Just pointing out that your apparent
assumption that your “convenient” matches everyone else’s is not really
valid…

/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

Sorry about that! We do use Lotus Notes here … :frowning:

Attached MyRequests.diff here - will send index.html and Closed.html
seperately.

–DavidJesse Vincent jesse@bestpractical.com wrote on 11/04/2006 07:29:39 PM:

Could you please resend your patches as attachments? Including them
inline lets mail clients do horrible things, like wordwrap them,
breaking the patches :wink:

Thanks!
Jesse

MyRequests.diff (2.17 KB)

Thanks! AppliedOn Mon, Nov 06, 2006 at 05:19:26PM -0500, David Chandek-Stark wrote:

Sorry about that! We do use Lotus Notes here … :frowning:

Attached MyRequests.diff here - will send index.html and Closed.html
seperately.

–David

Jesse Vincent jesse@bestpractical.com wrote on 11/04/2006 07:29:39 PM:

Could you please resend your patches as attachments? Including them
inline lets mail clients do horrible things, like wordwrap them,
breaking the patches :wink:

Thanks!
Jesse

Where this bug is fixed? I’m on 3.6.1 and it’s here :wink:
On 3.6.2 ?
Alessio