Skip Menu |
 

This queue is for tickets about the RT-Extension-PriorityAsString CPAN distribution.

Report information
The Basics
Id: 82367
Status: new
Priority: 0/
Queue: RT-Extension-PriorityAsString

People
Owner: Nobody in particular
Requestors: bergonz [...] labs.it
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From bergonz [...] labs.it Wed Jan 2 13: 46:43 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"; format="flowed"
Message-ID: <50E48082.3010006 [...] labs.it>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: Debian amavisd-new at xha-xen.internal.labs.it
X-Spam-Score: -6.899
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id E94A0240BB0 for <cpan-bug+RT-Extension-PriorityAsString [...] hipster.bestpractical.com>; Wed, 2 Jan 2013 13:46:42 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rmyUoKwb8b0h for <cpan-bug+RT-Extension-PriorityAsString [...] hipster.bestpractical.com>; Wed, 2 Jan 2013 13:46:39 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 65746240AE7 for <bug-RT-Extension-PriorityAsString [...] rt.cpan.org>; Wed, 2 Jan 2013 13:46:39 -0500 (EST)
Received: (qmail 19128 invoked by uid 103); 2 Jan 2013 18:46:38 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 2 Jan 2013 18:46:38 -0000
Received: from 62-101-95-227.ip.fastwebnet.it (HELO mxpontecchio.labs.it) (62.101.95.227) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Wed, 02 Jan 2013 10:46:35 -0800
Received: from localhost (localhost [127.0.0.1]) by mxpontecchio.labs.it (Postfix) with ESMTP id 57F4877997 for <bug-RT-Extension-PriorityAsString [...] rt.cpan.org>; Wed, 2 Jan 2013 19:46:31 +0100 (CET)
Received: from mxpontecchio.labs.it ([127.0.0.1]) by localhost (xha-xen.internal.labs.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qd4Bu7tRlbMR for <bug-RT-Extension-PriorityAsString [...] rt.cpan.org>; Wed, 2 Jan 2013 19:46:29 +0100 (CET)
Received: from [192.168.1.2] (host174-23-dynamic.55-79-r.retail.telecomitalia.it [79.55.23.174]) by mxpontecchio.labs.it (Postfix) with ESMTPSA id 3869877936 for <bug-RT-Extension-PriorityAsString [...] rt.cpan.org>; Wed, 2 Jan 2013 19:46:29 +0100 (CET)
Delivered-To: cpan-bug+RT-Extension-PriorityAsString [...] hipster.bestpractical.com
Subject: Fix for tsv spreadsheet output
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0
Return-Path: <bergonz [...] labs.it>
X-RT-Mail-Extension: rt-extension-priorityasstring
X-Original-To: cpan-bug+RT-Extension-PriorityAsString [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Date: Wed, 02 Jan 2013 19:46:26 +0100
X-Spam-Level:
To: bug-RT-Extension-PriorityAsString [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Michele Bergonzoni <bergonz [...] labs.it>
X-RT-Original-Encoding: ISO-8859-15
Content-Length: 989
Download (untitled) / with headers
text/plain 989b
RT-Extension-PriorityAsString puts HTML formatting in TSV output when exporting ticket search results as a spreadsheet. The fix from Tim Cutts on rt-user 2012-04-11 is to modify html/Callbacks/PriorityAsString/Elements/RT__Ticket/ColumnMap/Once to return the bare string when the HTML request path includes "Results.tsv". I modified his patch to remove extra quotes. What I am using now and works for me is to add at line 9 of the file, just after "return '' unless defined $string && length $string;" and before "my $escaped = $m->interp->apply_escapes($string, 'h');" the following snippet: my $request_path = $HTML::Mason::Commands::r->path_info; if ($request_path =~ /Results\.tsv/) { return $string; } Testing the MIME type of the HTTP reply would be cleaner, but I don't know how to do that. I already reported this as #22049 in queue rt3 at issues.bestpractical.com because I didn't know there was this specific place for this extension, and Kevin directed me here.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.