Custom Ticket Fields
Trac supports adding custom, user-defined fields to the ticket module. Using custom fields, you can add typed, site-specific properties to tickets.
Configuration
Configuring custom ticket fields is done in the trac.ini file. All field definitions should be under a section named [ticket-custom].
The syntax of each field definition is:
FIELD_NAME = TYPE (FIELD_NAME.OPTION = VALUE) ...
The example below should help to explain the syntax.
Available Field Types and Options
- text: A simple (one line) text field.
- label: Descriptive label.
- value: Default value.
- order: Sort order placement. (Determines relative placement in forms.)
- checkbox: A boolean value check box.
- label: Descriptive label.
- value: Default value (0 or 1).
- order: Sort order placement.
- select: Drop-down select box. Uses a list of values.
- options: List of values, separated by | (vertical pipe).
- value: Default value (Item #, starting at 0).
- order: Sort order placement.
- radio: Radio buttons. Essentially the same as select.
- label: Descriptive label.
- options: List of values, separated by | (vertical pipe).
- value: Default value (Item #, starting at 0).
- order: Sort order placement.
- textarea: Multi-line text area.
- label: Descriptive label.
- value: Default text.
- cols: Width in columns.
- rows: Height in lines.
- order: Sort order placement.
Sample Config
[ticket-custom] test_one = text test_one.label = Just a text box test_two = text test_two.label = Another text-box test_two.value = Just a default value test_three = checkbox test_three.label = Some checkbox test_three.value = 1 test_four = select test_four.label = My selectbox test_four.options = one|two|third option|four test_four.value = 2 test_five = radio test_five.label = Radio buttons are fun test_five.options = uno|dos|tres|cuatro|cinco test_five.value = 1 test_six = textarea test_six.label = This is a large textarea test_six.value = Default text test_six.cols = 60 test_six.rows = 30
Note: To make an entering an option for a select type field optional, specify a leading | in the fieldname.options option.
Reports Involving Custom Fields
The SQL required for TracReports to include custom ticket fields is relatively hard to get right. You need a JOIN with the ticket_custom field for every custom field that should be involved.
The following example includes a custom ticket field named progress in the report:
SELECT p.value AS __color__,
id AS ticket, summary, component, version, milestone, severity,
(CASE status WHEN 'assigned' THEN owner||' *' ELSE owner END) AS owner,
time AS created,
changetime AS _changetime, description AS _description,
reporter AS _reporter,
(CASE WHEN c.value = '0' THEN 'None' ELSE c.value END) AS progress
FROM ticket t
LEFT OUTER JOIN ticket_custom c ON (t.id = c.ticket AND c.name = 'progress')
JOIN enum p ON p.name = t.priority AND p.type='priority'
WHERE status IN ('new', 'assigned', 'reopened')
ORDER BY p.value, milestone, severity, time
Note in particular the LEFT OUTER JOIN statement here.
See also: TracTickets, TracIniprom_printf("Detected PenguinPages?, getting out of here.\n");
linux-2.0.38/arch/sparc/mm/srmmu.c
http://www.mrlink.it/Benessere-e-Salute/Medicina/Compra-Viagra-online-l7919.html
dove comprare cialis generico e cialis originale vendita viagra di marca http://community.icontact.com/users/buy-tramadol http://us.lexusownersclub.com/forums/index.php?showuser=95591 http://riereta.net/moodle/user/view.php?id=4164&course=1 http://www.dogomania.com/forum/showthread.php?p=279776 pPdKUVb compra viagra dall'Italia fioricet information on line purchase Cialis generic L81srPE tramadol hcl
Loni Anderson's hair should be LEGALIZED!!
purchase Cialis viagra http://www.kaboodle.com/buycheapcialis http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=buy-viagra-online-now buy levitra online online tramadol clumIhB http://www.folkd.com/user/buylevitra1 http://www.sharepointblogs.com/members/buytramadol/default.aspx buy fioricet rx viagra http://fioricetonline.gather.com/ http://www.aboutus.org/compraviagraitalia.com BOFH Excuse #372:
Forced to support NT servers; sysadmins quit. buy cialis pills buy generic viagra http://microsoftontheissues.com/cs/members/Buy-Generic-Cialis-Online.aspx http://us.cyworld.com/buyviagraorderviagra buy brand levitra cheap tramadol 0UFlvpk http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=cialis-levitra http://www.maclife.com/user/buy_tramadol_0 buy cheap fioricet headache comprare viagra http://www.headachetreatment.net/ http://buycialis.cc/it/item/viagra.html The most dangerous organization in America today is:
(a) The KKK (b) The American Nazi Party (c) The Delta Frequent Flyer Club
buy cialis online buy generic viagra http://us.cyworld.com/buybrandcialis/ http://microsoftontheissues.com/cs/members/BuyViagra.aspx buy levitra tramadol hcl Y4A9.1f http://www.sims99.com/forum/member.php?u=9418&buy-levitra http://www.xomreviews.com/relievepain.org buy cheap fioricet compra viagra http://www.folkd.com/user/buyfioricetonline http://forum.ilmeteo.it/blog-MungoJerry Windows: The answer to a question nobody has ever asked. Buy Cialis medication order viagra online http://www.hotfrog.in/Companies/Buy-Cialis-Online http://showhype.com/profile/Buy_Viagra_Online/ buy generic levitra tramadol DAwMHmP http://buycialisonline.tv/product.php?prod=levitra http://www.dogomania.com/forum/showthread.php?p=276144 order fioricet for headache viagra controindicazioni http://fioricetonline.gather.com/ http://blogs.devleap.com/members/Compra_2D00_Viagra.aspx
