Fork me on GitHub

Trac Ticket Queries

In addition to reports, Trac provides support for custom ticket queries, which can be used to display tickets that meet specified 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 in and no name/email is 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 dropdown 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 dropdown menu of options can be added multiple times to perform an Or on 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.

After you have 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

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 in by placing pipes (|) between the columns:


This is displayed as:

Full rows

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


This is displayed as:

Results (1 - 3 of 307)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#1332 fixed Delphes does not store the correct weight Abdualazem
Description Dear Delphes Authors,

I am having a problem retrieving the correct weight from Delphes root file. Here how I get the root file:

cat /tmp/amoohamm/hepmc.fifo | ./DelphesHepMC cards/delphes_card_ATLAS.tcl output.root

The hepmc.fifo is produced via Pythia8 from Les Houches file with the following format:

15 10001 1.36506E+01 2.05720E+01 -1.00000E+00 1.77837E-01
3 -1 0 0 507 0 0.000000000E+00 0.000000000E+00 3.866309873E+02 3.866309873E+02 0.000000000E+00 0.00000E+00 9.000E+00
21 -1 0 0 511 502 0.000000000E+00 0.000000000E+00 -1.121473065E+02 1.121473065E+02 0.000000000E+00 0.00000E+00 9.000E+00
-6 2 1 2 0 502 1.039979686E+00 2.799223146E+01 1.504222825E+02 2.306348911E+02 1.725715601E+02 0.00000E+00 9.000E+00
6 2 1 2 507 0 1.533759779E+01 -4.044145820E+01 1.511016994E+02 2.341671436E+02 1.735850630E+02 0.00000E+00 9.000E+00
-24 2 3 3 0 0 -1.078311255E+01 3.431724357E+01 1.744392277E+02 1.952668130E+02 8.003833691E+01 0.00000E+00 9.000E+00
24 2 4 4 0 0 -2.785773239E+00 3.859294509E+01 4.886098652E+01 1.021446287E+02 8.092560301E+01 0.00000E+00 9.000E+00
-11 1 6 6 0 0 -2.590232044E+01 5.527099496E+01 3.047187124E+01 6.822278230E+01 2.407909617E-06 0.00000E+00 9.000E+00
12 1 6 6 0 0 2.311654720E+01 -1.667804987E+01 1.838911527E+01 3.392184639E+01 6.743495762E-07 0.00000E+00 9.000E+00
13 1 5 5 0 0 -3.639585533E+01 2.601163309E+01 4.650143087E+01 6.452632341E+01 9.536743164E-07 0.00000E+00 9.000E+00
-14 1 5 5 0 0 2.561274278E+01 8.305610487E+00 1.279377968E+02 1.307404896E+02 2.697398305E-06 0.00000E+00 9.000E+00
5 1 4 4 513 0 7.947326197E+00 -6.224428178E+01 8.586790926E+01 1.064583061E+02 4.750000000E+00 0.00000E+00 9.000E+00
-5 1 3 3 0 512 1.095248248E+01 5.475384760E+00 -1.743428319E+01 2.182781347E+01 4.750000000E+00 0.00000E+00 9.000E+00
3 1 1 2 511 0 -1.637757747E+01 1.244922674E+01 -2.704030117E+01 3.397625903E+01 1.066240300E-06 0.00000E+00 9.000E+00
21 1 3 3 512 502 8.706097532E-01 -1.180039687E+01 -6.582662004E+00 1.354026465E+01 3.371747881E-07 0.00000E+00 9.000E+00
21 1 4 4 507 513 1.017604483E+01 -1.679012151E+01 1.637280368E+01 2.556420875E+01 2.384185791E-07 0.00000E+00 9.000E+00
#rwgt 1 16 0.11585110755460491 1 71004330 0

In my analysis code, I store the weight as follows:

HepMCEvent *eve = (HepMCEvent*) branchEvent->At(0);
weight = eve->Weight;
cout <<" Weight: "<<weight<< endl;

So this always picks up the third column in the first line of the event block which is 1.36506E+01. However, this is not the weight that I want.The weight that I'm interested to get is:


This weight is not the same for all the events. Notice that I tried to fetch the variables of the weight in the root file all of them agreed with the wrong weight. So it does not even store the correct weight in the root file.

I would appreciate it if someone can help with this. Thanks a lot.

Kind regards,
#1331 fixed Add variables to Class Jet using DelphesPythia8 alefisico
Description Hi all

I am having problems trying to add a variable into the Class::Jet and storing it in the output root file.

I am using delphes with this tag tags/3.4.2pre15, in lxplus at cern, using the CMSSW libraries, and the PYTHIA8 libraries as:

export PYTHIA8=/cvmfs/

I dont know if it matters, or if you have access, but to install delphes with Pythia8 I am using this recipe:

Now, I want to run DelphesPythia8 using a fastjet external package (HEPTopTagger). I install it correctly and I am sure that the package is running with the DelphesPythia8 command. Then I want to store the output variables of the algorithm in the final rootfile.

For that I copy the delpes_card_CMS with the new feature:
And I include the variable in the Class:Candidate first:

and then in the Class::Jet:

and store the variable in the WriteTree module:

of course I am filling the variable in the FastJetFinder module:

But after succesfully running the job as:
./DelphesPythia8 cards/delphes_card_CMS_withHTT.tcl configLHE_0001.cmnd delphesSample_0001.root

The jet branch does not contain the variable at all. Am I missing something?

Also, weird thing, if I define the variable IsTop in the Class::Jet
anywhere before 418, the code compiles but I got a segmentation fault error while I ran DelphesPythia8.

Please let me know if you need more information.
Thanks for the help.

#1330 fixed where is fConfReader defined ? Haqiqat
Description Hi

I'm manipulating Delphes Isolation module. I found out that it uses fConfReader in GetString method. Would you please tell me where is fConfReader defined ?
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. Filters are separated by ampersands (&). Each filter 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 omitted 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, TicketQuery

Last modified 5 months ago Last modified on Mar 8, 2018 2:02:47 AM