Right, they are in the trac.ini file. -----Original Message----- From: trac-users@googlegroups.com [mailto:trac-us...@googlegroups.com] On Behalf Of yoheeb Sent: Wednesday, July 01, 2009 2:13 PM To: Trac Users Subject: [Trac] Re: Query options of a custom field
On Jul 1, 1:21 pm, RJOllos <ry...@physiosonics.com> wrote: > It sounds to me like the values for custom fields of a ticket are > stored in the ticket_custom table, but not the available options for a > custom field. Where are the possible values for the custom field > stored? > > On Jun 30, 5:00 am, "Dan Winslow" <dwins...@aiminstitute.org> wrote: > > > The custom values are stored in the ticket_custom table. The columns are > > ticket, name, and value. Ticket holds the ticket id, name holds the > > field name, and value holds the field value. It's quite a cumbersome way > > to do things but it works. > > > -----Original Message----- > > From: trac-users@googlegroups.com [mailto:trac-us...@googlegroups.com] > > > On Behalf Of RJOllos > > Sent: Monday, June 29, 2009 7:51 PM > > To: Trac Users > > Subject: [Trac] Query options of a custom field > > > Hi, > > > I would like to list the options of a custom field in a wiki page. > > Using the WikiTable macro [1] I've been able to do this for fields of > > a ticket that have their own table or exist in a table of the > > database, such as component and resolution. > > > SELECT name, description FROM component ORDER BY name > > > SELECT name FROM enum WHERE type = 'resolution' > > > However, I don't understand from looking at the database schema [2] if/ > > where the options of a custom field or stored, though I think that I > > understand that the actual value of a custom field is stored in the > > database rather than a key. > > > [1]http://trac-hacks.org/wiki/WikiTableMacro > > [2]http://trac.edgewall.org/wiki/TracDev/DatabaseSchema > > > Thanks! the possible options of custom fields (I am assuming a select type here) are stored in the .ini file. my guess is the only "off the shelf" option you'll find, and I have never used this, so I can't verify is the http://trac-hacks.org/wiki/IniGetMacro in theory, something like this [[IniGet(CustomFieldA.options)]] probably in a table or something: ||'''Custom Field Name'''||'''Possible Values'''|| ||CustomFieldA|| [[IniGet(CustomFieldA.options)]] || ||CustomFieldX|| [[IniGet(CustomFieldX.options)]] || I also expect it will be ugly with a response like 100|200|300|400| 500 so you might want to augment this macro to split on the | and format the result string. Again, assuming it works. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---