[Trac] Tickets, reports for custom fields
Roy Yves
yves.roy at umontreal.ca
Mon Apr 4 10:48:47 EDT 2005
Dear TRAC users:
Here is my problem:
(to illustrate the situation, you can have a look at http://unfweb.criugm.qc.ca/cgi-bin/repric/trac.cgi/newticket)
I have added custom fields in the trac.ini file under [ticket-custom] in the following way:
my_component = select
my_component.label = Software
my_component.options = __CategoryA__|ItemA1|ItemA2|__CategoryB__|ItemB1|ItemB2|ItemB3
And they appear nicely *in this specific order* in the New Ticket interface, i.e. the select box looks like this:
__CategoryA__
ItemA1
ItemA2
__CategoryB__
ItemB1
ItemB2
ItemB3
This is fine. However:
Question 1:
-----------
How can I use tickets' custom fields in reports?
For example, in a report, one could see only the following fields:
Ticket Summary **Software** Status Severity Owner created
#1 test ItemA2 ....
where Software is the label of my_component.
In other word, can I **replace** the Component field by my custom field (and to see why I would like to replace it, see Question 2 below)?
For example, while the following works:
SELECT id AS ticket, component, status, severity, priority, owner,
time as created, summary FROM ticket
WHERE status IN ('new', 'assigned', 'reopened')
ORDER BY priority, time
the following does not:
SELECT id AS ticket, my_component, status, severity, priority, owner,
time as created, summary FROM ticket
WHERE status IN ('new', 'assigned', 'reopened')
ORDER BY priority, time
and gives me the error:
Report failed: no such column: my_component
Question 2:
-----------
If I can't replace Component, how can I add components by using the trac-admin component add <name> <owner> tool **BUT maintaining the order/organisation in the selection box**. It seems that components get ordered by default following an alphanumeric order which destroy the organisation that I can achieve with ustom components (although the trac-admin component list command seems to retain the order:
$ trac-admin /trac/repric component list
Name Owner
-------------------------------------
______FMRI ANALYSIS____ -
fMRIstat -
SPM -
______MINC_____________ -
mincinfo -
mincheader -
______CONVERSION_______ -
dcm2mnc -
dicom3_to_minc -
toolX
).
Also, what can I do if I do not want to specify an owner when I add new component (why should they necessarily be owned?).
Thanks
Yves
More information about the Trac
mailing list