"Erik Bray" <[EMAIL PROTECTED]> wrote:

>
>On Thu, Nov 20, 2008 at 3:40 AM, petermity <[EMAIL PROTECTED]> wrote:
>>
>> "Erik Bray" <[EMAIL PROTECTED]> wrote:
>>
>>>
>>>On Sat, Nov 15, 2008 at 2:01 AM, petermity <[EMAIL PROTECTED]> wrote:
>>>>
>>>> I would like to export from Trac in a similar format as I
>>>> imported to it.  I used a hand-created CSV file and the script:
>>>>   http://trac.edgewall.org/attachment/wiki/TracSynchronize/csv2trac.2.py
>>>>
>>>> I defined three custom fields (cross_references, meeting_discuss,
>>>> current_status).  The CSV header line and one record sample:
>>>>
>>>> type,cross_references,time,changetime,component,reporter,cc,url,version,milestone,status,resolution,keywords,meeting_discuss,priority,severity,owner,summary,description,current_status
>>>> task,XR-37512,,,,,,,,,new,,,Maybe,1,1,John,"Issue sample","Description
>>>> line 1
>>>> Description line 2: Issue discussed at meeting 'Big Issues', last Wed.
>>>> Description line 3
>>>> ","Awaiting TIB"
>>>>
>>>> This imported fine and works.  But I can find no report or query
>>>> method for exporting to the same kind of CSV format.  Choosing
>>>> the CSV export link at the end of a report or query does not
>>>> include the Description.
>>>>
>>>> Playing with sqlite3.exe on trac.db and the ticket and
>>>> ticket_custom tables, my newbie SQL non-skills are apparent; a
>>>> join of, or trying to select fields from, both tables gives
>>>> duplicate ticket records.  What I want is a single record for
>>>> each ticket, with the three custom field values included.  (I
>>>> don't really care what the field order is, just want all fields
>>>> of each ticket).
>>>
>>>If you want to add the description, manually add col=description to
>>>the URL query string.
>>
>> Thank you very much for the reply!  Yes, this worked; even the
>> newline formatting in the Description field is preserved, and
>> (after re-checking the checkbox of a couple fields that had
>> somehow become unchecked) I verified it exported all data OK.
>
>Yeah, I figured it should work for you.  I've had users come to me
>with the same problem.  I keep meaning to try to come up with a better
>solution to this, though I haven't really thought about it much at
>this point.

Perhaps a checkbox next to the Description checkbox, titled "As
column" or similar.  Ditto for any custom TextArea field.

I'd also like to see a choice for whether to format the
Description (or TextArea) field with newlines as they exist in
the actual field content.  (Whether it is in the report as a row
or column).  Maybe via PRE or just a BR before each line break,
so reports have readable Descriptions instead of all mashed
together in a big text blob.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to