You are correct. Solution to problem 1. Unable to search for custom field number without running query twice?
In order to enter the contract# on the wiki page we need to build a form using get method that will post the result to query module. We use raw html functionality of a wiki. Here is the form. I've updated the http://trac.edgewall.org/wiki/WikiProcessors with example #4. This is extremely useful for us, and will cut down our search usage by half. {{{ #!html <form action="/query" method="get"> <input type="text" name="contract_number" value="~" size="30"> <input type="submit" value="Search by Contract#"> </form> }}} On Mar 1, 8:36 am, CM Lubinski <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > We've resorted to using raw html to create a form which submits to a > report with a dynamic variable [1]. > > You might look into a thread from a few months ago [2], which increases > the speed of search results. > > Good luck, > CM Lubinski > > [1]http://trac.edgewall.org/wiki/TracReports#AdvancedReports:DynamicVari... > [2]http://groups.google.com/group/trac-users/browse_thread/thread/348016... > > > > Lukasz Szybalski wrote: > > > On Feb 26, 1:59 am, Rowan <[email protected]> wrote: > >> In response to your points > > >> 1. To get the results of the query it has to be run, so no. > > I wish there was a way to pull up a "http://example.com/trac/query? > > status=new&status=reopened&order=priority&milestone=MyCategory_Other&contract_number=123" > > but wait for user to enter the contract# into the field before query > > gets run. > > > aka: > >http://trac.edgewall.org/query?priority=highest&priority=high&status=... > > but user wants a different ticket# > > >> 2. That's the nature of MySQL each time an update is run on a table > >> the query cache is cleared for any queries that are run on that table. > > ok > > >> 3. I've not investigated trac's database structure but that is one > >> long query, what is the actual aim of the query? > > > This is a query that trac is making by default. When you click on > > "view tickets" then custom query" , add your custom field in a query > > ui, and the sql statement I've email will run. Actually what I found > > out is that mysql TEXT field (custom field) cannot be stored in > > memory, and by switching it to varchar you can increase the > > performance of the query to 0.1 sec. #6986 > > I'm just not sure if that is true or not, and whether it can be done > > without breaking trac? > > > Thanks, > > Lucas > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org > > iEYEARECAAYFAkuL0QoACgkQfzi1OiZiJLD7yACeOQ9XPofFWD7zwikzY3W3RMKh > QT0An1CL6Mh4FtAkn0RiTMJmehxH81Sw > =2jRF > -----END PGP SIGNATURE----- -- 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.
