wiki:TracQuery

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.

Filters

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.

Example:

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

This is displayed as:

#3
java path to libzip.so not in env-shell.sh environment
#4
glshovel can zoom to individual OM's
#12
cmake occasionally rebuilds everything
#15
glshovel docs and plugin examples
#20
metaprojects can bulid against binaries of offline-software
#27
DefaultName misleading/confusing
#28
test binaries should allow 'run what matches this regex'
#31
Offline software is a misnomer.
#35
outlet doesn't process other than physics frames
#36
outlet is single-threaded
#37
a queue (server) should ping its source (dispatch) and re-connect, if this ping fails
#39
Good error when fpmaster disk full
#43
possible deadlock, when stopping dispatch before server
#50
glshovel DOMLaunchSeriesMap crash on warehouse data
#51
use JEBEventServiceIsolator.PopEvent(...) in JEBEventService
#54
I3DOMCalibration class needs a suck-ectomy
#56
standardized data backwards-compatibility testing system
#57
libPyROOT on a mac not loading in python properly
#62
cmake header-only projects.
#63
remove dependence on phys-services. Depend on project interfaces.
#64
make sprng, gmp problems ignorable
#65
changing I3_WORK to I3_SRC and I3_BUILD
#69
View -> Take Snapshot bad location
#71
glshovel creates zero-size captures
#74
all tickets by milestone report broken
#75
python scripts can become detached from terminals and eat CPU in the background
#76
I3Modules don't have namespaces
#95
tools build fails on teufel
#102
i3tv client should attempt to reconnect and disconnection should be obvious
#103
rightclick to configure broken on osx
#106
ithon and tarballing broken
#111
analysis-tree fails to build with ROOT v5.16.00
#223
Improved I3Live web presence for PnF monitoring values
#254
photonics changes
#268
Ncurses includes not properly found on SUSE Linux Enterprise Server 11 (x86_64)
#292
Tests should dump output to per project directories
#310
potentially confusing behavior of I3Double when used with operators ">" and "<"
#372
TTrigger compiler error
#377
Allow simple queries to I3TriggerHierarchy from python
#447
I3Bool and I3Int
#514
project dataio needs to not depend on dataclasses/GCD specifics.
#523
glshovel movies do not update when glshovel is not on the screen
#535
make tarball copying error in install_shlib.pl
#557
enable negative times in glshovel
#568
cmake should get svn url via svn:keywords, not shelling out
#639
Examine and redo link hierarchy on Mac OS X
#640
Examine and redo link hierarchy on Mac OS X
#642
Doxygen docs generation is broken
#649
Reported that "make tarball" is broken
#736
Fix FIXME in tpx
#767
ports V5 and SuiteSparse installation on Ubuntu 12.04.5 LTS
#820
steamshovel - panning extremely slow
#831
steamshovel - fix 'mac-steamshovel-package' target so the bots can do auto-builds
#867
clsim - propagation server
#902
[tableio] - MCTree Converters
#959
clsim - implement dynamic DOM oversizing
#982
corsika-reader read from pipe
#1042
[cmake] Error for boost 1.58.0
#1068
[trigger-sim] traysegment should read GCD from frame-stream not file
#1088
[cmake] make all dependencies
#1094
[trigger-sim] needs some rst docs
#1105
errors when running L2 processing on noise generation files
#1140
[trigger-sim] test coverage low
#1185
Fix FIXME/#warning
#1197
[wavereform] TODO
#1266
tidy up TESTDATA
#1294
[simprod-scripts] corsika module update
#1379
[steamshovel] event switching segfault
#1399
[MuonGun] Implement unbiased generation
#1403
cmake libarchive detection problem on osX (combo)
#1404
[dataio-pyshovel] [dataio] write out frame(packet) from screen
#1407
[dataio][icetray] support boost serialization >= 1.58 format
#1449
[steamshovel] [buildbots] Generate nightly/weekly .dmgs for steamshovel
#1454
[cmake] fix include dir for ROOT Minuit2
#1477
I3Trigger - I3TriggerHierarchy - move I3TriggerHierarchy out from I3Trigger
#1504
[clsim] documentation from slack conversation
#1517
[clsim] coalesce PEs
#1521
implicit conversion warning in ppc
#1536
[genie-icetray] tests taking 1000+ minutes to run
#1546
remove the need for svn:externals (and merge the icetray repository back into the main one)
#1630
[tpx] IceRec 5 Release
#1643
[filterscripts] Exercise L1 filter as a standard test.
#1645
[sim-services] GCD for IceTop
#1714
[clsim] Allow clsim to use a geometry with a mix of DOM sizes
#1733
[tableio] named argument in class declaration
#1751
[ppc] Add stau support
#1772
IceRec 5.0 - projects out of sync
#1775
[dataio] add context manager support to I3File
#1847
dst - test dst::dst16.py is failing across the board
#1862
icetray-start has incorrect syntax
#1894
[millipede] New GCD file pushes reco energy just outside tolerance
#1941
MuonGun weighting failing with simulation V05 MCTree
#1959
[icetray] multi-core IceTray 2020
#1962
[photospline] Merge photospline2 branches into the trunk
#2013
Revisit Random Number Generation
#2020
[simprod-scripts] consider modernization of modules
#2030
[offline] Reduce memory footprint for I3Position and I3Direction
#2034
clast - documentation is out of date
#2045
links to doxygen are broken on project "master pages"
#2073
[clsim] Implementation of hole ice
#2089
[clsim] AutoSetGeant4Environment does not play nicely with py2-v3
#2133
[phys-services] handle IceAct and Scintillators
#2139
[MuonGun] Weighting Problem
#2149
[clsim] Merge multiprocess-server branch
#2150
[corsika-reader] CORSIKA as a Service
#2153
[dataclasses] I3SuperDST decoding is borked
#2170
Broken Files in 20208
#2171
Broken files in 20222
#2177
[dataclasses] Heisenbug in I3SuperDST::EncodeWidth()
#2180
Neutrino simulation event has a pulse width of zero
#2181
[dataclasses] SuperDST should not produce pulses with the same time
#2195
[PROPOSAL] Long table generation times.
#2199
Error when building clsim w/ py3-v4
#2220
[code review] Internal Review of Rock Bottom Framework
#2277
[monopole-generator] Code Review
#2282
[combo] DirectReco in Combo
#2298
[NoiseEngine] Upgrade Readiness Review
#2299
[PROPOSAL] Upgrade Readiness Review
#2300
[STTools] Upgrade Readiness Review
#2301
[WaveCalibrator] Upgrade Readiness Review
#2302
[VHESelfVeto] Upgrade Readiness Review
#2303
[gcdserver] Upgrade Readiness Review
#2304
[astro] Upgrade Readiness Review
#2305
[coinc-twc] Upgrade Readiness Review
#2306
[daq-decode] Upgrade Readiness Review
#2307
[dataclasses] Upgrade Readiness Review
#2308
[icetray] Upgrade Readiness Review
#2309
[dst] Upgrade Readiness Review
#2310
[earthmodel-service] Upgrade Readiness Review
#2311
[filter-tools] Upgrade Readiness Review
#2312
[g4-tankresponse] Upgrade Readiness Review
#2313
[genie-icetray] Upgrade Readiness Review
#2314
[hdfwriter] Upgrade Readiness Review
#2315
[MuonGun] Upgrade Readiness Review
#2316
[ice-models] Upgrade Readiness Review
#2317
[ophelia] Upgrade Readiness Review
#2318
[pybdt] Upgrade Readiness Review
#2319
[smallshower-filter] Upgrade Readiness Review
#2320
[toprec] Upgrade Readiness Review
#2321
[vemcal] Upgrade Readiness Review
#2322
[wimpsim-reader] Upgrade Readiness Review
#2325
[MuonGun] Exclude stochastic losses outside active volume in Track::GetEnery()

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:

[[TicketQuery(id=123)]]

This is displayed as:

#123
OMKey back to dataclasses

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

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

This is displayed as:

#3, #4, #12, #15, #20, #27, #28, #31, #35, #36, #37, #39, #43, #50, #51, #54, #56, #57, #62, #63, #64, #65, #69, #71, #74, #75, #76, #95, #102, #103, #106, #111, #223, #254, #268, #292, #310, #372, #377, #447, #514, #523, #535, #557, #568, #639, #640, #642, #649, #736, #767, #820, #831, #867, #902, #959, #982, #1042, #1068, #1088, #1094, #1105, #1140, #1185, #1197, #1266, #1294, #1379, #1399, #1403, #1404, #1407, #1449, #1454, #1477, #1504, #1517, #1521, #1536, #1546, #1630, #1643, #1645, #1714, #1733, #1751, #1772, #1775, #1847, #1862, #1894, #1941, #1959, #1962, #2013, #2020, #2030, #2034, #2045, #2073, #2089, #2133, #2139, #2149, #2150, #2153, #2170, #2171, #2177, #2180, #2181, #2195, #2199, #2220, #2277, #2282, #2298, #2299, #2300, #2301, #2302, #2303, #2304, #2305, #2306, #2307, #2308, #2309, #2310, #2311, #2312, #2313, #2314, #2315, #2316, #2317, #2318, #2319, #2320, #2321, #2322, #2325

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:

142

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:

[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]

This is displayed as:

Results (1 - 3 of 2425)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#2460 fixed [docs] docs-build hangs olivas olivas
#2459 fixed [GCD] Couple issues - IC79 and Pass2 olivas olivas
#2458 fixed [review] Stochasticity Calculator olivas olivas
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:

[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter,rows=description)]]

This is displayed as:

Results (1 - 3 of 2425)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#2460 fixed [docs] docs-build hangs olivas olivas
Description

Trying to build the documentation (and even upload it) in preparation for the upcoming release. Unfortunately it hangs. I even left it to run overnight just for ho-hos. I'm tempted to set this as a blocker, since I'm not keen on putting a release out without up-to-date documentation for people to refer to. I've convinced myself. I'm making this a blocker.

#2459 fixed [GCD] Couple issues - IC79 and Pass2 olivas olivas
Description

Combo isn't backward compatible with IC79 GCD.

The latest pass2 GCD used for production seems to mimic pass1, as reported on today's tech call. I'm setting the priority as 'major' (normally I might go for blocker), but there appear to be work-arounds and it's not clear whether the pass2 issue is an issue, but we'll wait to hear from WGs to report back on systematics. There were reports of improved PE distributions with new sets in the past.

#2458 fixed [review] Stochasticity Calculator olivas olivas
Description

http://code.icecube.wisc.edu/svn/sandbox/yanglyu/stochasicity-calculator/

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 10 years ago Last modified on Apr 28, 2014 2:15:03 PM