[rt-users] Downloading query results to spreadsheet

Kenneth Crocker KFCrocker at lbl.gov
Wed Feb 20 18:30:53 EST 2008


Stephen,


	On the wiki info about your code there was a reference to the fact that 
the changes worked up to 3.4.5, but in 3.6.x it had problems and that 
they were fixed with this code:

         } else {
             $row->{ $column } =  $value ;
         }
         $row->{ $column } =~ s/, <br \/>//g;    # ColumnMap adds <br /> 
tags, which we don't want
         $row->{ $column } =~ s/<em>, (pending other Collection), <\/em>//g;
     }
     push @rows, $row;
}"

	So I put in the two "$row" lines of code and removed the old one. So, 
what am I missing? Is there new info to get this working? Todd?

Kenn
LBNL

On 2/20/2008 1:42 PM, Stephen Turner wrote:
> At Wednesday 2/20/2008 04:25 PM, Kenneth Crocker wrote:
>> Stephen,
>>
>>         HA! I got it working. I had failed to copy & modify the 
>> "ScrubHTML" fiel. The titles line up with the data fine now. The only 
>> problem I have now is that the ticket link data doesn't display 
>> correctly. I get subject, dates, status, etc. OK. For Parent/Child or 
>> DependsOn/DependedOnBy I get this:
>>         "<a href=", 
>> https://rt.dev.lbl.gov/Ticket/Display.html?id=55009, ">, 55009, 
>> </a><br />".
>>
>>         Any clue about that result? Anyone?
>>
>> Kenn
>> LBNL
> 
> I'd say you've found a bug. It's because   
> /Elements/RT__Ticket/ColumnMap wraps the <href> tag around link field 
> values.
> 
> A kludge that might work is to strip out the HTML tag from the result, a 
> bit like the way the <br> tag is stripped out:
> 
> $row->{ $column } =~ s/, <br>//g;
> 
> You'd need a regex that would strip off everything around the '55009' 
> from  '<a href=", https://rt.dev.lbl.gov/Ticket/Display.html?id=55009, 
> ">, 55009, </a><br />'
> 
> Steve
> 
> 




More information about the rt-users mailing list