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:

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:

[[TicketQuery(id=123)]]

This is displayed as:

#123
Fuzzed sample crashes ffplay

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:

0

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 5921)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#7857 fixed FFmpeg failed to run fate-hls-segment-size test on release|x86 and debug|x86 configuration with VS2017 on windows KarenHuang
#7856 fixed libvpx parameter arnr-maxframes documented as arnr-max-frames zerocrates
#7853 fixed mp3 file without .mp3 filename extension is probed as vc1 wader
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 5921)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#7857 fixed FFmpeg failed to run fate-hls-segment-size test on release|x86 and debug|x86 configuration with VS2017 on windows KarenHuang
Description

Summary of the bug: FFmpeg failed to run fate-hls-segment-size test on release|x86 and debug|x86 configuration with VS2017 on Windows. This issue can be first reproduced from master revision 2a50f1d. Could you please help take a look at this? Thank you!

Steps to reproduce:

1.git clone ​https://github.com/FFmpeg/FFmpeg.git D:\FFmpeg\src 2.Open a VS 2017 x86 prompt and browse to D:\FFmpeg 3.set FFMPEG_TARGET=i386 4.set FFMPEG_SRC_PATH=D:\FFmpeg/src 5.set FFMPEG_FATE_PATH=../fate-suite/ 6.set PATH=D:\FFmpeg\tools;%PATH% 7.set MSYS2_PATH_TYPE=inherit 8..\tools\msys32\usr\bin\sh.exe --login -i -c "/D/ffmpeg/tools/build.sh" 9..\tools\msys32\usr\bin\sh.exe --login -i -c "/D/ffmpeg/tools/test.sh"

Actual result: reference file './tests/ref/fate/hls-segment-size' not found ./tests/fate-run.sh: line 523: tests/data/fate/hls-segment-size.diff: No such file or directory Test hls-segment-size failed. Look at tests/data/fate/hls-segment-size.err for details. make: * [tests/Makefile:236: fate-hls-segment-size] Error 1 make: * Waiting for unfinished jobs.... TEST filter-allyuv Failed FATE test suite! [command took 67 seconds]

#7856 fixed libvpx parameter arnr-maxframes documented as arnr-max-frames zerocrates
Description

The Codecs documentation page lists an option for libvpx as arnr-max-frames but ffmpeg actually looks for arnr-maxframes.

The extra-hyphen version seems to be used for libaom.

#7853 fixed mp3 file without .mp3 filename extension is probed as vc1 wader
Description

Summary of the bug:

ffmpeg probes mp3 file as raw VC-1 video

How to reproduce:

# Download mp3 file (is the podcast "The Everything 80s Podcast" episode "Laserdisc: A Technology Ahead Of Its Time?")
$ curl -OLJ https://traffic.libsyn.com/secure/everything80spodcast/12Laserdisc.mp3

$ md5 12Laserdisc.mp3
MD5 (12Laserdisc) = d8b9d5ddc37d4b2758985c52f040ff38

# Make a copy without .mp3 extension
$ cp 12Laserdisc.mp3 12Laserdisc

# ffprobe file without extension 
$ ffmpeg -v trace 12Laserdisc
ffprobe version git-2019-04-17-2a50f1d Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 8.3.0 (Alpine 8.3.0)
  configuration: --enable-debug
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 51.100 / 58. 51.100
  libavformat    58. 27.102 / 58. 27.102
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
[NULL @ 0x7fefdb07b300] Opening '12Laserdisc' for reading
[file @ 0x561afc763cc0] Setting default whitelist 'file,crypto'
Probing mp3 score:12 size:2048
Probing mp3 score:12 size:4096
Probing mp3 score:12 size:8192
Probing mp3 score:12 size:16384
Probing mp3 score:12 size:32768
Probing mp3 score:12 size:65536
Probing mp3 score:12 size:131072
Probing vc1 score:26 size:131072
[vc1 @ 0x7fefdb07b300] Format vc1 probed with size=131072 and score=26
id3v2 ver:2 flags:00 len:1156830
[vc1 @ 0x7fefdb07b300] demuxer does not support additional id3 data, skipping
[vc1 @ 0x7fefdb07b300] Before avformat_find_stream_info() pos: 1156840 bytes read:1179276 seeks:0 nb_streams:1
[vc1 @ 0x7fefdb07b300] Failed to open codec in avformat_find_stream_info
[NULL @ 0x7fefdafe8500] Entry point: 34E9B1AA
[NULL @ 0x7fefdafe8500] [IMGUTILS @ 0x7ffdf56ff320] Picture size 0x0 is invalid
[NULL @ 0x7fefdafe8500] Failed to set dimensions 0 0
[NULL @ 0x7fefdafe8500] Entry point: 61246260
[NULL @ 0x7fefdafe8500] Chroma scaling is not supported, expect wrong picture
[NULL @ 0x7fefdafe8500] Entry point info:
BrokenLink=0, ClosedEntry=1, PanscanFlag=1
RefDist=0, Postproc=0, FastUVMC=0, ExtMV=0
DQuant=2, VSTransform=0, Overlap=1, Qmode=0
[NULL @ 0x7fefdafe8500] Entry point: 0E21FE67
[NULL @ 0x7fefdafe8500] [IMGUTILS @ 0x7ffdf56ff320] Picture size 0x0 is invalid
[NULL @ 0x7fefdafe8500] Failed to set dimensions 0 0
[vc1 @ 0x7fefdafe8500] Entry point: 34E9B1AA
[vc1 @ 0x7fefdafe8500] [IMGUTILS @ 0x7ffdf56ff3a0] Picture size 0x0 is invalid
[vc1 @ 0x7fefdafe8500] Failed to set dimensions 0 0
[NULL @ 0x7fefdafe8500] Header: 4F26CB16
[NULL @ 0x7fefdafe8500] Profile 1:
frmrtq_postproc=7, bitrtq_postproc=18
LoopFilter=0, MultiRes=1, FastUVMC=1, Extended MV=1
Rangered=0, VSTransform=1, Overlap=1, SyncMarker=1
DQuant=0, Quantizer mode=1, Max B-frames=1
[vc1 @ 0x7fefdb07b300] Probe buffer size limit of 5000000 bytes reached
[vc1 @ 0x7fefdb07b300] stream 0: start_time: -7686143364045.646 duration: -7686143364045.646
[vc1 @ 0x7fefdb07b300] format: start_time: -9223372036854.775 duration: -9223372036854.775 bitrate=0 kb/s
[vc1 @ 0x7fefdb07b300] Could not find codec parameters for stream 0 (Video: vc1, 1 reference frame, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[vc1 @ 0x7fefdb07b300] After avformat_find_stream_info() pos: 7293580 bytes read:7306892 seeks:0 frames:6
Input #0, vc1, from '12Laserdisc':
  Metadata:
    TSS             : GarageBand 4.1.2
    iTunNORM        :  00000102 00000001 00007764 00000A8A 00013BD0 00013992 0000712D 000076B4 001ABBC6 001AC734
    iTunSMPB        :  00000000 00000210 00000AAF 0000000004A74EC1 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    genre           : Podcast
    album           : The Everything 80s Podcast
    TT3             : Laserdisc is an advanced technology that came out in the mid 80s. It actually goes much further back into the late 50s and the original intention was never specific for playing movies. In this episode you will learn how Laserdisc developed, the pros and c
    TBP             : 120
    title           : Laserdisc: A Technology Ahead Of Its Time?
    artist          : Jamie Logie
    TCM             : Jamie Logie
    date            : 2019-04-09 13:42
  Duration: N/A, bitrate: N/A
    Stream #0:0, 6, 1/1200000: Video: vc1, 1 reference frame, none, 25 fps, 25 tbr, 1200k tbn, 25 tbc
[vc1 @ 0x561afc7aefc0] Entry point: 34E9B1AA
[vc1 @ 0x561afc7aefc0] [IMGUTILS @ 0x7ffdf56ff770] Picture size 0x0 is invalid
[vc1 @ 0x561afc7aefc0] Failed to set dimensions 0 0
Could not open codec for input stream 0

# ffprobe file with extension
$ ffmpeg -v trace 12Laserdisc.mp3
ffprobe version git-2019-04-17-2a50f1d Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 8.3.0 (Alpine 8.3.0)
  configuration: --enable-debug
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 51.100 / 58. 51.100
  libavformat    58. 27.102 / 58. 27.102
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
[NULL @ 0x7fced06bb300] Opening '12Laserdisc.mp3' for reading
[file @ 0x562b1b52acc0] Setting default whitelist 'file,crypto'
Probing mp3 score:12 size:2048
[mp3 @ 0x7fced06bb300] Format mp3 probed with size=2048 and score=50
id3v2 ver:2 flags:00 len:1156830
[mp3 @ 0x7fced06bb300] Skipping 0 bytes of junk at 1156840.
[mp3 @ 0x7fced06bb300] Before avformat_find_stream_info() pos: 1156840 bytes read:1179276 seeks:0 nb_streams:2
[mjpeg @ 0x562b1b53bf80] marker=d8 avail_size_in_buf=1146172
[mjpeg @ 0x562b1b53bf80] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x562b1b53bf80] marker=e1 avail_size_in_buf=1146170
[mjpeg @ 0x562b1b53bf80] marker parser used 9652 bytes (77216 bits)
[mjpeg @ 0x562b1b53bf80] marker=ed avail_size_in_buf=1136515
[mjpeg @ 0x562b1b53bf80] marker parser used 12173 bytes (97384 bits)
[mjpeg @ 0x562b1b53bf80] marker=e1 avail_size_in_buf=1124339
[mjpeg @ 0x562b1b53bf80] marker parser used 4590 bytes (36720 bits)
[mjpeg @ 0x562b1b53bf80] marker=ee avail_size_in_buf=1119746
[mjpeg @ 0x562b1b53bf80] marker parser used 33 bytes (264 bits)
[mjpeg @ 0x562b1b53bf80] marker=db avail_size_in_buf=1119711
[mjpeg @ 0x562b1b53bf80] index=0
[mjpeg @ 0x562b1b53bf80] qscale[0]: 0
[mjpeg @ 0x562b1b53bf80] index=1
[mjpeg @ 0x562b1b53bf80] qscale[1]: 0
[mjpeg @ 0x562b1b53bf80] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x562b1b53bf80] marker=c2 avail_size_in_buf=1119577
[mjpeg @ 0x562b1b53bf80] Changing bps from 0 to 8
[mjpeg @ 0x562b1b53bf80] sof0: picture: 3000x3000
[mjpeg @ 0x562b1b53bf80] component 0 1:1 id: 0 quant:0
[mjpeg @ 0x562b1b53bf80] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x562b1b53bf80] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x562b1b53bf80] pix fmt id 11111100
[mjpeg @ 0x562b1b53bf80] Format yuvj444p chosen by get_format().
[mjpeg @ 0x562b1b53bf80] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x562b1b53bf80] marker=c4 avail_size_in_buf=1119558
[mjpeg @ 0x562b1b53bf80] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x562b1b53bf80] escaping removed 997672 bytes
[mjpeg @ 0x562b1b53bf80] marker=da avail_size_in_buf=1119191
[mjpeg @ 0x562b1b53bf80] marker parser used 121519 bytes (972152 bits)
[mjpeg @ 0x562b1b53bf80] escaping removed 934735 bytes
[mjpeg @ 0x562b1b53bf80] marker=da avail_size_in_buf=997483
[mjpeg @ 0x562b1b53bf80] marker parser used 62748 bytes (501984 bits)
[mjpeg @ 0x562b1b53bf80] escaping removed 870518 bytes
[mjpeg @ 0x562b1b53bf80] marker=da avail_size_in_buf=934543
[mjpeg @ 0x562b1b53bf80] marker parser used 64025 bytes (512200 bits)
[mjpeg @ 0x562b1b53bf80] escaping removed 788795 bytes
[mjpeg @ 0x562b1b53bf80] marker=da avail_size_in_buf=870294
[mjpeg @ 0x562b1b53bf80] marker parser used 81499 bytes (651992 bits)
[mjpeg @ 0x562b1b53bf80] escaping removed 598034 bytes
[mjpeg @ 0x562b1b53bf80] marker=da avail_size_in_buf=788468
[mjpeg @ 0x562b1b53bf80] marker parser used 190434 bytes (1523472 bits)
[mjpeg @ 0x562b1b53bf80] escaping removed 404066 bytes
[mjpeg @ 0x562b1b53bf80] marker=da avail_size_in_buf=597461
[mjpeg @ 0x562b1b53bf80] marker parser used 193395 bytes (1547160 bits)
[mjpeg @ 0x562b1b53bf80] escaping removed 1271 bytes
[mjpeg @ 0x562b1b53bf80] marker=da avail_size_in_buf=403388
[mjpeg @ 0x562b1b53bf80] marker parser used 402117 bytes (3216936 bits)
[mjpeg @ 0x562b1b53bf80] marker=d9 avail_size_in_buf=0
[mjpeg @ 0x562b1b53bf80] decode frame unused 0 bytes
[mp3 @ 0x7fced06bb300] All info found
[mp3 @ 0x7fced06bb300] Estimating duration from bitrate, this may be inaccurate
[mp3 @ 0x7fced06bb300] stream 0: start_time: 0.000 duration: 1770.449
[mp3 @ 0x7fced06bb300] stream 1: start_time: -102481911520608.625 duration: 1770.449
[mp3 @ 0x7fced06bb300] format: start_time: 0.000 duration: 1770.449 bitrate=133 kb/s
[mp3 @ 0x7fced06bb300] After avformat_find_stream_info() pos: 1178344 bytes read:1179276 seeks:0 frames:51
Input #0, mp3, from '12Laserdisc.mp3':
  Metadata:
    TSS             : GarageBand 4.1.2
    iTunNORM        :  00000102 00000001 00007764 00000A8A 00013BD0 00013992 0000712D 000076B4 001ABBC6 001AC734
    iTunSMPB        :  00000000 00000210 00000AAF 0000000004A74EC1 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    genre           : Podcast
    album           : The Everything 80s Podcast
    TT3             : Laserdisc is an advanced technology that came out in the mid 80s. It actually goes much further back into the late 50s and the original intention was never specific for playing movies. In this episode you will learn how Laserdisc developed, the pros and c
    TBP             : 120
    title           : Laserdisc: A Technology Ahead Of Its Time?
    artist          : Jamie Logie
    TCM             : Jamie Logie
    date            : 2019-04-09 13:42
  Duration: 00:29:30.45, start: 0.000000, bitrate: 133 kb/s
    Stream #0:0, 50, 1/14112000: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
    Stream #0:1, 1, 1/90000: Video: mjpeg (Progressive), 1 reference frame, yuvj444p(pc, bt470bg/unknown/unknown, center), 3000x3000, 0/1, 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Other
[AVIOContext @ 0x7fced06bb940] Statistics: 1179276 bytes read, 0 seeks

# ffmpeg version
$ ffmpeg -version
ffprobe version git-2019-04-17-2a50f1d Copyright (c) 2007-2019 the FFmpeg developers
built with gcc 8.3.0 (Alpine 8.3.0)
configuration: --enable-debug
libavutil      56. 26.100 / 56. 26.100
libavcodec     58. 51.100 / 58. 51.100
libavformat    58. 27.102 / 58. 27.102
libavdevice    58.  7.100 / 58.  7.100
libavfilter     7. 48.100 /  7. 48.100
libswscale      5.  4.100 /  5.  4.100
libswresample   3.  4.100 /  3.  4.100

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 4 years ago Last modified on Jul 6, 2015, 10:44:56 PM