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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#5730 invalid Rewrapping H.264 MXF file from camera Sony FS 7 creates file not playable by Quicktime rmk
#5726 duplicate zoompan filter outputs shaky vidoe jammy
#5723 fixed Regression, decoding FFV1 in mov broken rmk
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 4334)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#5730 invalid Rewrapping H.264 MXF file from camera Sony FS 7 creates file not playable by Quicktime rmk
Description

How to reproduce:

ffmpeg -i ~/lesspain/samples/cameras/sony/pxw_fs7/sony_pxw_fs7_1080_xavc_2997p_13s.MXF -y -an -c:v copy sony_pxw_fs7_1080_xavc_2997p_13s-ffmpeg-rewrap-video-only.mov
ffmpeg version N-81077-g640c096 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: 
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 50.100 / 57. 50.100
  libavformat    57. 44.100 / 57. 44.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
[h264 @ 0x7fb0b2001600] Truncating likely oversized PPS
    Last message repeated 9 times
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Guessed Channel Layout for Input Stream #0.5 : mono
Guessed Channel Layout for Input Stream #0.6 : mono
Guessed Channel Layout for Input Stream #0.7 : mono
Guessed Channel Layout for Input Stream #0.8 : mono
Input #0, mxf, from '/Users/krueger/lesspain/samples/cameras/sony/pxw_fs7/sony_pxw_fs7_1080_xavc_2997p_13s.MXF':
  Metadata:
    uid             : 791517d2-264c-11e6-826b-0800469995c2
    generation_uid  : 791517dc-264c-11e6-8829-0800469995c2
    company_name    : Sony
    product_name    : Mem 
    product_version : 2.00
    product_uid     : cede1104-8280-11de-8a39-08004678031c
    modification_date: 2016-05-30 09:54:17
    material_package_umid: 0x060A2B340101010501010D43130000000FA7A669387505D208004602029995C2
    timecode        : 00:00:57;20
  Duration: 00:00:13.68, start: 0.000000, bitrate: 123923 kb/s
    Stream #0:0: Video: h264 (High 4:2:2 Intra), yuv422p10le(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:9: Data: none
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
      data_type       : vbi_vanc_smpte_436M
[mov @ 0x7fb0b1838600] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mov, to 'sony_pxw_fs7_1080_xavc_2997p_13s-ffmpeg-rewrap-video-only.mov':
  Metadata:
    uid             : 791517d2-264c-11e6-826b-0800469995c2
    generation_uid  : 791517dc-264c-11e6-8829-0800469995c2
    company_name    : Sony
    product_name    : Mem 
    product_version : 2.00
    product_uid     : cede1104-8280-11de-8a39-08004678031c
    modification_date: 2016-05-30 09:54:17
    material_package_umid: 0x060A2B340101010501010D43130000000FA7A669387505D208004602029995C2
    timecode        : 00:00:57;20
    encoder         : Lavf57.44.100
    Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv422p10le(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 0.03 fps, 29.97 tbr, 30k tbn, 29.97 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[NULL @ 0x7fb0b2001600] Truncating likely oversized PPS
    Last message repeated 399 times
[mov @ 0x7fb0b1838600] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=  410 fps=0.0 q=-1.0 Lsize=  189217kB time=00:00:13.64 bitrate=113583.0kbits/s speed=27.3x    
video:189215kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001157%

Then open the resulting file in Quicktime. It will refuse to open it and show an error dialog with the text "The file may be damaged or may not be a movie file compatible with Quicktime"

Sample can be downloaded at https://www.dropbox.com/s/l6jx4ymfeuga53z/sony_pxw_fs7_1080_xavc_2997p_13s.MXF?dl=1

Please note the warnings about "Truncating likely oversized PPS". The mov container of the resulting file looks ok at first glance compared to files that work but maybe the H.264 extradata is not parsed and then written correctly for some reason (just a wild guess).

#5726 duplicate zoompan filter outputs shaky vidoe jammy
Description

Adding a zoompan filter to an image with no panning works smoothly, however when panning the zoom to the center of the image, the result is a video with a shaky image. I have used the same filter example as shown in the zoompan filter documentation.

This is the command line:

ffmpeg -y \
-i img.jpg \
-filter_complex "zoompan=z='min(zoom+0.0015,1.5)':d=125:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'" \
-vcodec libx264 -pix_fmt yuv420p -r 25 -t 5 out.mp4

Below is the console output. I have also attached the full console output, input image and the output video.

ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.1) 20160609
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared --enable-libvpx --enable-pic --enable-zlib
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, image2, from 'img.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 28100 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1024x640 [SAR 72:72 DAR 8:5], 25 tbr, 25 tbn, 25 tbc
[swscaler @ 0x109f380] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x1083e00] using SAR=1/1
[libx264 @ 0x1083e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x1083e00] profile High, level 3.1
[libx264 @ 0x1083e00] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x1081ae0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf57.41.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.48.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 (mjpeg) -> zoompan
  zoompan -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[swscaler @ 0x172e040] Warning: data is not aligned! This can lead to a speedloss
frame=  125 fps= 91 q=-1.0 Lsize=     642kB time=00:00:04.88 bitrate=1077.5kbits/s speed=3.55x    
video:640kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.356806%
[libx264 @ 0x1083e00] frame I:1     Avg QP:20.29  size:121874
[libx264 @ 0x1083e00] frame P:31    Avg QP:20.53  size: 13035
[libx264 @ 0x1083e00] frame B:93    Avg QP:26.16  size:  1380
[libx264 @ 0x1083e00] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
[libx264 @ 0x1083e00] mb I  I16..4:  8.7% 75.8% 15.6%
[libx264 @ 0x1083e00] mb P  I16..4:  0.1%  0.1%  0.0%  P16..4: 45.1% 11.9%  8.7%  0.0%  0.0%    skip:34.1%
[libx264 @ 0x1083e00] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 34.5%  0.4%  0.1%  direct: 0.3%  skip:64.7%  L0:48.9% L1:49.3% BI: 1.9%
[libx264 @ 0x1083e00] 8x8 transform intra:73.4% inter:78.3%
[libx264 @ 0x1083e00] coded y,uvDC,uvAC intra: 74.2% 87.0% 68.3% inter: 4.7% 11.5% 3.8%
[libx264 @ 0x1083e00] i16 v,h,dc,p:  4% 42%  5% 49%
[libx264 @ 0x1083e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 28% 15%  5%  9%  6% 12%  5% 10%
[libx264 @ 0x1083e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 22% 10%  7% 12%  8% 12%  7%  9%
[libx264 @ 0x1083e00] i8c dc,h,v,p: 43% 33% 10% 14%
[libx264 @ 0x1083e00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1083e00] ref P L0: 61.6%  7.9% 12.2% 18.2%
[libx264 @ 0x1083e00] ref B L0: 79.5% 16.7%  3.8%
[libx264 @ 0x1083e00] ref B L1: 91.0%  9.0%
[libx264 @ 0x1083e00] kb/s:1046.86

I also receive this warning in the console output. [swscaler @ 0x172e040] Warning: data is not aligned! This can lead to a speedloss

#5723 fixed Regression, decoding FFV1 in mov broken rmk
Description

Summary of the bug: How to reproduce:

./ffmpeg -f lavfi -i "nullsrc=s=256x256:d=1" -c:v ffv1 ffv1.mov
ffmpeg version N-81043-ga49ed9e Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: 
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 50.100 / 57. 50.100
  libavformat    57. 42.100 / 57. 42.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
Input #0, lavfi, from 'nullsrc=s=256x256:d=1':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 256x256 [SAR 1:1 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
[mov @ 0x7fc6d1001c00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[mov @ 0x7fc6d1001c00] Using MS style video codec tag, the file may be unplayable!
Output #0, mov, to 'ffv1.mov':
  Metadata:
    encoder         : Lavf57.42.100
    Stream #0:0: Video: ffv1, yuv420p, 256x256 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.50.100 ffv1
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> ffv1 (native))
Press [q] to stop, [?] for help
frame=   25 fps=0.0 q=-0.0 Lsize=       3kB time=00:00:00.96 bitrate=  23.0kbits/s speed=42.2x    
video:2kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 44.852940%
krueger@Roberts-MacBook-Pro ~/eclipse-workspaces/lp/c/ffmpeg (master)*$ ./ffmpeg -i ffv1.mov 
ffmpeg version N-81043-ga49ed9e Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: 
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 50.100 / 57. 50.100
  libavformat    57. 42.100 / 57. 42.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
[ffv1 @ 0x7f824081fa00] Invalid version in global header
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f824080da00] Failed to open codec in av_find_stream_info
[ffv1 @ 0x7f824081fa00] Invalid version in global header
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ffv1.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf57.42.100
  Duration: 00:00:01.00, start: 0.000000, bitrate: 22 kb/s
    Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), none, 256x256, 15 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Lavc57.50.100 ffv1
At least one output file must be specified

Seems to be a regression since 3c058f570128dcfa3a68f0860e2be7f098e8d6e1

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