Trac Ticket Queries

In addition to reports, Trac provides support for custom ticket queries, used to display lists of tickets meeting a specified set of criteria.

To configure and execute a custom query, switch to the View Tickets module from the navigation bar, and select the Custom Query link.


When you first go to the query page the default filter will display tickets relevant to you:

  • If logged in then all open tickets it will display open tickets assigned to you.
  • If not logged in but you have specified a name or email address in the preferences then it will display all open tickets where your email (or name if email not defined) is in the CC list.
  • If not logged and no name/email defined in the preferences then all open issues are displayed.

Current filters can be removed by clicking the button to the left with the minus sign on the label. New filters are added from the pulldown lists at the bottom corners of the filters box ('And' conditions on the left, 'Or' conditions on the right). Filters with either a text box or a pulldown menu of options can be added multiple times to perform an or of the criteria.

You can use the fields just below the filters box to group the results based on a field, or display the full description for each ticket.

Once you've edited your filters click the Update button to refresh your results.

Clicking on one of the query results will take you to that ticket. You can navigate through the results by clicking the Next Ticket or Previous Ticket links just below the main menu bar, or click the Back to Query link to return to the query page.

You can safely edit any of the tickets and continue to navigate through the results using the Next/Previous/Back to Query links after saving your results. When you return to the query any tickets which were edited will be displayed with italicized text. If one of the tickets was edited such that it no longer matches the query criteria the text will also be greyed. Lastly, if a new ticket matching the query criteria has been created, it will be shown in bold.

The query results can be refreshed and cleared of these status indicators by clicking the Update button again.

Saving Queries

Trac allows you to save the query as a named query accessible from the reports module. To save a query ensure that you have Updated the view and then click the Save query button displayed beneath the results. You can also save references to queries in Wiki content, as described below.

Note: one way to easily build queries like the ones below, you can build and test the queries in the Custom report module and when ready - click Save query. This will build the query string for you. All you need to do is remove the extra line breaks.

Note: you must have the REPORT_CREATE permission in order to save queries to the list of default reports. The Save query button will only appear if you are logged in as a user that has been granted this permission. If your account does not have permission to create reports, you can still use the methods below to save a query.

You may want to save some queries so that you can come back to them later. You can do this by making a link to the query from any Wiki page.

[query:status=new|assigned|reopened&version=1.0 Active tickets against 1.0]

Which is displayed as:

Active tickets against 1.0

This uses a very simple query language to specify the criteria (see Query Language).

Alternatively, you can copy the query string of a query and paste that into the Wiki link, including the leading ? character:

[query:?status=new&status=assigned&status=reopened&group=owner Assigned tickets by owner]

Which is displayed as:

Assigned tickets by owner

Using the [[TicketQuery]] Macro

The TicketQuery macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.



This is displayed as:

No results

Just like the query: wiki links, the parameter of this macro expects a query string formatted according to the rules of the simple ticket query language. This also allows displaying the link and description of a single ticket:


This is displayed as:

No results

A more compact representation without the ticket summaries is also available:

[[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]

This is displayed as:

No results

Finally, if you wish to receive only the number of defects that match the query, use the count parameter.

[[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]]

This is displayed as:


Customizing the table format

You can also customize the columns displayed in the table format (format=table) by using col=<field> - you can specify multiple fields and what order they are displayed by placing pipes (|) between the columns like below:


This is displayed as:

Results (1 - 3 of 40)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#40 migrated Error Using Couenne Through Julia pbelotti muriloasouza
#39 migrated Unable to build couenne pbelotti speren
#38 migrated Couenne says "infeasible problem" when there is binary variables! pbelotti Burcu
1 2 3 4 5 6 7 8 9 10 11

Full rows

In table format you can also have full rows by using rows=<field> like below:


This is displayed as:

Results (1 - 3 of 40)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#40 migrated Error Using Couenne Through Julia pbelotti muriloasouza

Hello, i'm having a problem when i try to solve a MINLP in Atom (Julia Programing Language).

This is the problem i'm trying to solve:

min 100*(x5 - (0.5 + x4)2)2 + (1 - x4)2

s.t. x4*x3 + x5*x1 <= 20

5*x1 - 2*x5 + 3*x3 <= 17

x4, x5 binary

0 <= x1 <= 3

0 <= x2 <= 5

0 <= x3 <= 10

When i run my code in Atom, using Couenne as solver, I get the following solution:

objective function value = 0.24937733210128057

x1 = 1

x2 = 2.5

x3 = 2

x4 = 0.50124

x5 = 1

So, x4 in the solution is not binary. Is this a bug in Couenne?

Thanks in advance!

#39 migrated Unable to build couenne pbelotti speren

Dear sir I have a problem installing Couenne on my computer (running Mint 18.3).

We have to solve relatively small non convex quadratic problem, and so Couenne seemed to be a great opportunity.

The problem that we look at appears as a relaxation of a two player localisation game in a graph. For very small values we can solve the system "by hand" which allow us to derive lower bound for our combinatorial problem. But the larger system the better is the bound we derive, so would live to find the solution for relativelly small problems.

I followed quite closely the installation instructions for Couenne but the make fails in CoinsUtils?.


make[2]: * [Makefile:584: CoinLpIO.lo] Error 1 make[2]: Leaving directory '/home/speren/Couenne-0.1/build/CoinUtils/src' make[1]: * [Makefile:365: all-recursive] Error 1 make[1]: Leaving directory '/home/speren/Couenne-0.1/build/CoinUtils' make: * [Makefile:302: all-recursive] Error 1

A) First i installed the third party components, there were some minor issues in the provided script (some ftp servers do not exist anymore so i changed some ftp
into http:// also some target files were outdated).

for ASL :

unning script for downloading the source code for the ASL

Downloading the source code from --2018-03-27 10:16:28-- Resolving ( Connecting to (||:80... connected. HTTP request sent, awaiting response... 200 OK Length: 349014 (341K) [application/x-gzip] Saving to: ‘solvers.tgz’

solvers.tgz 100%[========================================================================================>] 340.83K 471KB/s in 0.7s

2018-03-27 10:16:29 (471 KB/s) - ‘solvers.tgz’ saved [349014/349014]

Unpacking the source code... Uncompressing the source files... Adding No_dtoa to CFLAGS... Deleting the tar file...

Done downloading the source code for ASL.

10:16 @sambaperati: /home/speren/Couenne-0.1/ThirdParty/ASL $-> ls solvers/ 00lastchange avltree.h configurehere fgh_read.c func_add.c jac2dim.c nqpcheckZ.c op_type.hd readsol.c sprintf.c xectim.c amplsolv.lbc basename.c conpval.c fg_read.c funcadd.c jac2dim.h makefile.wat obj2val.c pfghread.c repwhere.c sscanf.c xp1known.c bscanf.c conscale.c fg_write.c funcadd.h jacdim.c mip_pri.c obj_adj0.c pfg_read.c rnd_prod.s stderr.c xp2known.c arithchk.c b_search.c conval.c float.h0 funcaddk.c jacinc1.c misc.c obj_adj.c printf.c r_op.hd stdio1.h0 xsum0.out arith.h0 changes degree.c fpecatch.c funcaddr.c jacinc.c mpec_adj0.c obj_adj.h pshvprod.c r_opn0.hd strerror.c com2eval.c derprop.c fpinit.c genrowno.c jacpdim.h mpec_adj.c objconst.c psinfo.h r_opn.hd studchk0.c asldate.c comeval.c details.c0 fpinitmt.c getenv.c libnamsave.c mqpcheckv.c obj_prec.c punknown.c rops2.c suf_sos.c asl.h comptry.bat dtoa1.c fpsetprec64.s getstub.c mach.c mypow.c objval_.c qpcheck.c rops.c value.c asl_pfg.h con1ival.c dtoa.c fpsetprec.s getstub.h mainexit.c names.c objval.c qpcheckZ.c r_qp.hd writesol.c asl_pfgh.h con2ival.c duthes.c f_read.c g_fmt.c nl_obj.c opcode.hd qp_read.c sigcatch.c wrtsol_.c atof.c con2val.c dvalue.hd fullhes.c htcl.c nlp2.h opnos.hd qsortv.c sjac0dim.c ws_desc.c auxinfo.c conadj.c dynlink.c funcadd0.c indic_cons.c makefile.u nlp.h op_typeb.hd README sos_add.c wsu_desc.c avltree.c configure errchk.h funcadd1.c jac0dim.c makefile.u.orig nqpcheck.c op_type.c README.f77 sphes.c x2check.c

For Blas: i downloaded the current version (3.8.0) and moved as indicated all the fortran source file into the root directory :

10:20 @sambaperati: /home/speren/Couenne-0.1/ThirdParty/Blas $-> ls BLAS-3.8.0 chbmv.f ctpmv.f dgbmv.f dsdot.f dtbmv.f icamax.f scasum.f srotg.f ssyr2.f strsv.f zgemv.f zhpr2.f ztpsv.f blas.tar chemm.f crotg.f ctpsv.f dgemm.f dspmv.f dtbsv.f idamax.f scnrm2.f srotm.f ssyr2k.f xerbla_array.f zgerc.f zhpr.f ztrmm.f caxpy.f chemv.f cscal.f ctrmm.f dgemv.f dspr2.f dtpmv.f INSTALL.BLAS scopy.f srotmg.f ssyr.f xerbla.f zgeru.f zrotg.f ztrmv.f ccopy.f cher2.f csrot.f ctrmv.f dger.f dspr.f dtpsv.f isamax.f sdot.f ssbmv.f ssyrk.f zaxpy.f zhbmv.f zscal.f ztrsm.f cdotc.f cher2k.f csscal.f ctrsm.f dnrm2.f dswap.f dtrmm.f izamax.f sdsdot.f sscal.f stbmv.f zcopy.f zhemm.f zswap.f ztrsv.f cdotu.f cher.f cswap.f ctrsv.f drot.f dsymm.f dtrmv.f lsame.f sgbmv.f sspmv.f stbsv.f zdotc.f zhemv.f zsymm.f cgbmv.f cherk.f csymm.f dasum.f drotg.f dsymv.f dtrsm.f sgemm.f sspr2.f stpmv.f zdotu.f zher2.f zsyr2k.f cgemm.f chpmv.f csyr2k.f daxpy.f drotm.f dsyr2.f dtrsv.f sgemv.f sspr.f stpsv.f zdrot.f zher2k.f zsyrk.f cgemv.f chpr2.f csyrk.f dcabs1.f drotmg.f dsyr2k.f dzasum.f sasum.f sger.f sswap.f strmm.f zdscal.f zher.f ztbmv.f cgerc.f chpr.f ctbmv.f dcopy.f dsbmv.f dsyr.f dznrm2.f saxpy.f snrm2.f ssymm.f strmv.f zgbmv.f zherk.f ztbsv.f cgeru.f configure ctbsv.f ddot.f dscal.f dsyrk.f get.Blas scabs1.f srot.f ssymv.f strsm.f zgemm.f zhpmv.f ztpmv.f

For LAPACK : i downloaded lapack-3.1.0 and moved the resulting directory to Lapack :

/home/speren/Couenne-0.1/ThirdParty/Lapack $-> ls LAPACK/ma27-1.0.0.tar.gz INSTALL SRC

For MUMPS i did the same :

10:25 @sambaperati: /home/speren/Couenne-0.1/ThirdParty/Mumps $-> ls MUMPS/ ChangeLog? doc examples include lib libseq LICENSE Makefile MATLAB PORD README SCILAB src VERSION

Last for HSL i decided to get ma27-1.0.0.tar.gz and mc19-1.0.0.tar.gz , unpacked them and then rand configure, make, make install, i rand these command as root and so the 2 libraries are installed :root@sambaperati ma27-1.0.0]# ls /usr/local/lib/libma27.a /usr/local/lib/libma27.a [root@sambaperati ma27-1.0.0]# ls /usr/local/lib/libmc19.a /usr/local/lib/libmc19.a

Note that I could not register on the HSL website, so i had to fill a form for each download i performed there.

Here is HSL directory :

root@sambaperati HSL]# ls config.guess config.status configure depcomp dummy.lo install-sh libtool ma27-1.0.0 Makefile mc19-1.0.0.tar.gz config.log config.sub dummy.c INSTALL.HSL ma27-1.0.0.tar.gz mc19-1.0.0 missing

B) Next i did configure and make.

mkdir build

$ cd build $ ../configure -C $ make

configure: creating ./config.status config.status: creating Makefile config.status: creating src/main/Makefile config.status: creating src/Makefile config.status: creating test/Makefile config.status: creating test/ config.status: creating couenne_addlibs.txt config.status: creating inc/config_couenne.h config.status: executing depfiles commands configure: Configuration of Couenne successful configure: Main configuration of Couenne successful

#38 migrated Couenne says "infeasible problem" when there is binary variables! pbelotti Burcu

Dear All,

It is a nonlinear MIP model with continuous, binary and integer variables. When I try to solve it with couenne it says that it is infeasible. But I have already found an initial solution by hand that suits model. I am attaching this hand-made initial solution.

I just made a search through the net and found out that Couenne gave "infeasible solution" for other people's models when there are binary variables. I changed my binary variables to continious variables, and couenne works! But ofcourse the result is meaningless. Would you please help me to solve the model with my binar variables?

I am attaching the model and data in AMPL format. Below you can see the result page, when I run the model with binary variables. Thank you!

ampl: model C:\Users\BURCU\Desktop\Tez\AMPL_TEZ\Facility-baFN4.mod; data C:\Users\BURCU\Desktop\Tez\AMPL_TEZ\Facility-baFN4.dat; solve; Couenne 0.5.6 -- an Open-Source solver for Mixed Integer Nonlinear Optimization Mailing list: couenne@… Instructions: couenne: ANALYSIS TEST: Reformulating problem: 0.5 seconds NLP0012I

Num Status Obj It time Location

NLP0014I 1 INFEAS 0.96000003 70 60.098 Loaded instance "C:\Users\BURCU\AppData?\Local\Temp\" Constraints: 3796 Variables: 2271 (1121 integer) Auxiliaries: 1474 (287 integer)

Coin0506I Presolve 73 (-3599) rows, 78 (-3667) columns and 261 (-10185) elements Clp0006I 0 Obj 0 Primal inf 15608 (32) Clp0006I 33 Obj 3.0982e-014 Primal inf 2.999994 (6) Clp0006I 35 Obj 3.0988e-014 Clp0000I Optimal - objective value 0 Clp0032I Optimal objective 0 - 35 iterations time 0.032, Presolve 0.02 Clp0000I Optimal - objective value 0 NLP Heuristic: NLP0014I 2 INFEAS 0.99999999 32 1.229 no solution. Clp0000I Optimal - objective value 0 Optimality Based BT: 3 improved bounds Probing: 23 improved bounds NLP Heuristic: time limit reached. Cbc0013I At root node, 0 cuts changed objective from 0 to 0 in 1 passes Cbc0014I Cut generator 0 (Couenne convexifier cuts) - 0 row cuts average 0.0 elements, 57 column cuts (57 active) Cbc0010I After 0 nodes, 1 on tree, 1e+050 best solution, best possible -1.7976931e+308 (22.91 seconds) Optimality Based BT: 0 improved bounds Optimality Based BT: 0 improved bounds Optimality Based BT: 0 improved bounds Optimality Based BT: 0 improved bounds Cbc0001I Search completed - best objective 1e+050, took 298 iterations and 62 nodes (164.06 seconds) Cbc0035I Maximum depth 10, 0 variables fixed on reduced cost


Linearization cuts added at root node: 3672 Linearization cuts added in total: 3672 (separation time: 0.016s) Total solve time: 164.125s (164.125s in branch-and-bound) Lower bound: -inf Upper bound: inf (gap: --) Branch-and-bound nodes: 62 Performance of FBBT: 0.266s, 64 runs. fix: 0 shrnk: 0.826375 ubd: 7.02954 2ubd: 2.46442 infeas: 24

couenne: Infeasible problem

1 2 3 4 5 6 7 8 9 10 11

Query Language

query: TracLinks and the [[TicketQuery]] macro both use a mini “query language” for specifying query filters. Basically, the filters are separated by ampersands (&). Each filter then consists of the ticket field name, an operator, and one or more values. More than one value are separated by a pipe (|), meaning that the filter matches any of the values. To include a literal & or | in a value, escape the character with a backslash (\).

The available operators are:

= the field content exactly matches one of the values
~= the field content contains one or more of the values
^= the field content starts with one of the values
$= the field content ends with one of the values

All of these operators can also be negated:

!= the field content matches none of the values
!~= the field content does not contain any of the values
!^= the field content does not start with any of the values
!$= the field content does not end with any of the values

The date fields created and modified can be constrained by using the = operator and specifying a value containing two dates separated by two dots (..). Either end of the date range can be left empty, meaning that the corresponding end of the range is open. The date parser understands a few natural date specifications like "3 weeks ago", "last month" and "now", as well as Bugzilla-style date specifications like "1d", "2w", "3m" or "4y" for 1 day, 2 weeks, 3 months and 4 years, respectively. Spaces in date specifications can be left out to avoid having to quote the query string.

created=2007-01-01..2008-01-01 query tickets created in 2007
created=lastmonth..thismonth query tickets created during the previous month
modified=1weekago.. query tickets that have been modified in the last week
modified=..30daysago query tickets that have been inactive for the last 30 days

See also: TracTickets, TracReports, TracGuide

Last modified 7 years ago Last modified on Aug 20, 2013 9:17:26 PM