wiki:TicketQuery

TicketQuery Wiki Macro

The TicketQuery macro lets you display ticket information anywhere that accepts WikiFormatting. The query language used by the [[TicketQuery]] macro is described in the TracQuery page.

Usage

[[TicketQuery]]

Wiki macro listing tickets that match certain criteria.

This macro accepts a comma-separated list of keyed parameters, in the form "key=value".

If the key is the name of a field, the value must use the syntax of a filter specifier as defined in TracQuery#QueryLanguage. Note that this is not the same as the simplified URL syntax used for query: links starting with a ? character. Commas (,) can be included in field values by escaping them with a backslash (\).

Groups of field constraints to be OR-ed together can be separated by a literal or argument.

In addition to filters, several other named parameters can be used to control how the results are presented. All of them are optional.

The format parameter determines how the list of tickets is presented:

  • list -- the default presentation is to list the ticket ID next to the summary, with each ticket on a separate line.
  • compact -- the tickets are presented as a comma-separated list of ticket IDs.
  • count -- only the count of matching tickets is displayed
  • rawcount -- only the count of matching tickets is displayed, not even with a link to the corresponding query (since 1.1.1)
  • table -- a view similar to the custom query view (but without the controls)
  • progress -- a view similar to the milestone progress bars

The max parameter can be used to limit the number of tickets shown (defaults to 0, i.e. no maximum).

The order parameter sets the field used for ordering tickets (defaults to id).

The desc parameter indicates whether the order of the tickets should be reversed (defaults to false).

The group parameter sets the field used for grouping tickets (defaults to not being set).

The groupdesc parameter indicates whether the natural display order of the groups should be reversed (defaults to false).

The verbose parameter can be set to a true value in order to get the description for the listed tickets. For table format only. deprecated in favor of the rows parameter

The rows parameter can be used to specify which field(s) should be viewed as a row, e.g. rows=description|summary

The col parameter can be used to specify which fields should be viewed as columns. For table format only.

For compatibility with Trac 0.10, if there's a last positional parameter given to the macro, it will be used to specify the format. Also, using "&" as a field separator still works (except for order) but is deprecated.

Examples

Example Result Macro
Number of Triage tickets: 2223 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 2223 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 168 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 0 [[TicketQuery(status=assigned,count)]]
Number of invalid tickets: 1717 [[TicketQuery(status=closed,resolution=invalid,count)]]
Number of worksforme tickets: 262 [[TicketQuery(status=closed,resolution=worksforme,count)]]
Number of duplicate tickets: 555 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 276 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 4935 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 3075 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 11423 [[TicketQuery(count)]]
Number of tickets reported or owned by current user: 0 [[TicketQuery(reporter=$USER,or,owner=$USER,count)]]
Number of tickets created this month: 1 [[TicketQuery(created=thismonth..,count)]]
Number of closed Firefox tickets: 0 [[TicketQuery(status=closed,keywords~=firefox,count)]]
Number of closed Opera tickets: 0 [[TicketQuery(status=closed,keywords~=opera,count)]]
Number of closed tickets affecting Firefox and Opera: 0 [[TicketQuery(status=closed,keywords~=firefox opera,count)]]
Number of closed tickets affecting Firefox or Opera: 0 [[TicketQuery(status=closed,keywords~=firefox|opera,count)]]
Number of tickets that affect Firefox or are closed and affect Opera: 0 [[TicketQuery(status=closed,keywords~=opera,or,keywords~=firefox,count)]]
Number of closed Firefox tickets that don't affect Opera: 0 [[TicketQuery(status=closed,keywords~=firefox -opera,count)]]
Last 3 modified tickets: #11430, #11442, #11441 [[TicketQuery(max=3,order=modified,desc=1,compact)]]

Details of ticket #1:

[[TicketQuery(id=1,col=id|owner|reporter,rows=summary,table)]]

Ticket Owner Reporter
#1 Michael Niedermayer Michael Niedermayer
Summary Test

Format: list

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

This is displayed as:

No results

[[TicketQuery(id=123)]]

This is displayed as:

#123
Fuzzed sample crashes ffplay

Format: compact

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

This is displayed as:

No results

Format: count

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

This is displayed as:

0

Format: progress

[[TicketQuery(milestone=0.12.8&group=type,format=progress)]]

This is displayed as:

defect

7267 / 9541

enhancement

1009 / 1726

task

44 / 63

license violation

11 / 72

art

13 / 15

sponsoring request

4 / 6

Format: table

You can choose the columns displayed in the table format (format=table) using col=<field>. You can specify multiple fields and the order they are displayed in by placing pipes (|) between the columns:

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

This is displayed as:

Results (1 - 3 of 8348)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#11441 fixed Typo in docs for format filter Gyan Doshi <ffmpeg@gyani.pro> emcodem
#11428 fixed SIGFPE in xpsnr filter Gyan Doshi <ffmpeg@gyani.pro> Ronald S. Bultje
#11425 fixed 5813e5a (fix for hevc regression from a696b28) has not been backported to 7.1 Sebastian Meyer
1 2 3 4 5 6 7 8 9 10 11

Full rows

In table format you can specify full rows using rows=<field>:

[[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 8348)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#11441 fixed Typo in docs for format filter Gyan Doshi <ffmpeg@gyani.pro> emcodem
Description

Typo in /doc/filters.texi, format filter. color_ranges description says color_spaces=tv|pc but should say color_ranges=tv|pc

@item color_ranges
A '|'-separated list of color range names, such as
"color_spaces=tv|pc".
#11428 fixed SIGFPE in xpsnr filter Gyan Doshi <ffmpeg@gyani.pro> Ronald S. Bultje
Description

How to reproduce:

$ ~/Projects/ffmpeg/x86-64-gpl/ffmpeg -i ~/Movies/cif/bus_cif.y4m -i x.ivf -lavfi '[0:v]settb=1/30,setpts=N[a];[1:v]settb=1/30,setpts=N[b];[a][b]xpsnr' -f null -
ffmpeg version N-118043-g2dc864eb4e Copyright (c) 2000-2024 the FFmpeg developers
  built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
  configuration: --enable-gpl --samples=/Users/ronaldbultje/Movies/fate-suite --enable-libvpx --enable-libaom --enable-ffplay --enable-sdl2 --enable-version3 --enable-libdav1d --enable-libx264 --enable-libx265 --disable-videotoolbox --enable-libvmaf
  libavutil      59. 49.100 / 59. 49.100
  libavcodec     61. 26.100 / 61. 26.100
  libavformat    61.  9.100 / 61.  9.100
  libavdevice    61.  4.100 / 61.  4.100
  libavfilter    10.  6.101 / 10.  6.101
  libswscale      8. 12.100 /  8. 12.100
  libswresample   5.  4.100 /  5.  4.100
  libpostproc    58.  4.100 / 58.  4.100
Input #0, yuv4mpegpipe, from '/Users/ronaldbultje/Movies/cif/bus_cif.y4m':
  Duration: 00:00:05.00, start: 0.000000, bitrate: 36496 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 352x288, SAR 128:117 DAR 1408:1053, 30 fps, 30 tbr, 30 tbn
Input #1, ivf, from 'x.ivf':
  Duration: 00:00:03.34, start: 0.000000, bitrate: 341 kb/s
  Stream #1:0: Video: av1 (libdav1d) (Main) (AV01 / 0x31305641), yuv420p(tv), 352x288 [SAR 1:1 DAR 11:9], 29.97 tbr, 29.97 tbn
Stream mapping:
  Stream #0:0 (rawvideo) -> settb:default
  Stream #1:0 (libdav1d) -> settb:default
  xpsnr:default -> Stream #0:0 (wrapped_avframe)
Press [q] to stop, [?] for help
Floating point exception: 8

This is because xpsnr uses the framerate: https://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavfilter/vf_xpsnr.c;h=1b2c2a7c2c7a24da9494f4bddc9c1e368b5cb17a;hb=HEAD#l571 and this is reset in setpts and/or settb. Adding a fps=30 filter fixes it. I believe xpsnr uses fps to do 1st vs. 2nd order diffs (1st if fps<32, 2nd if fps>=32). But maybe it's meaningful to give users an alternative way to configure this distinction and not crash if the FPS is not set?

#11425 fixed 5813e5a (fix for hevc regression from a696b28) has not been backported to 7.1 Sebastian Meyer
Description

Summary of the bug: See https://github.com/streamlink/streamlink/issues/6410#issuecomment-2603369602

The Streamlink project implements a DASH client in Python and uses FFmpeg to remux the resulting video/audio streams into its output.

In the linked thread above, a user ran into an issue with FFmpeg n7.1 that doesn't occur on n7.0 or recent builds from master.

After running git bisect start 'n7.1' 'n7.0.2' and rebuilding FFmpeg, I found commit a696b288861a09403e316f4eb33bbc7cb6c03e5c to be the culprit. And after checking the master branch, I found that commit 5813e5aa344b8c03c83bf62e729be0f447944ed1 already fixed the regression introduced by the other commit.

However, the fix was never backported to the release/7.1 branch: https://git.ffmpeg.org/gitweb/ffmpeg.git/history/refs/heads/release/7.1:/libavformat/hevc.c

I'm therefore asking for a quick backport. Thank you!

Also, since I'm not aware, what's the patch release policy of FFmpeg? Will there be another patch release (n7.0.3), or do we have to wait for n7.2/n8.0 to be released? Thanks.

How to reproduce: The user who reported the issue has shared the video file here: https://drive.google.com/file/d/1g87o8wA0mwvgRNTrwTM36o-4ZnJIEMIv/view?usp=sharing

Bad commit (a696b288861a09403e316f4eb33bbc7cb6c03e5c):

$ ./ffmpeg-N-116167-ga696b28886-linux64-gpl-7.0/bin/ffmpeg -hide_banner -i video.mp4 -c copy -y video.mkv
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
  Metadata:
    major_brand     : iso9
    minor_version   : 0
    compatible_brands: iso9avc1cmf2cmfcdashclg1
    creation_time   : 2024-05-29T15:34:35.000000Z
  Duration: 482612:01:28.00, start: 1737403256.020000, bitrate: N/A
  Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 3840x2160 [SAR 1:1 DAR 16:9], 24007 kb/s, 50 fps, 50 tbr, 200 tbn (default)
      Metadata:
        creation_time   : 2024-05-29T15:34:35.000000Z
        handler_name    : BBC Video
        vendor_id       : [0][0][0][0]
        encoder         : HEVC Coding
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
[out#0/matroska @ 0x5e6173ef4100] Could not write header (incorrect codec parameters ?): Invalid data found when processing input
Conversion failed!

Good commit (a696b288861a09403e316f4eb33bbc7cb6c03e5c~1 or current HEAD of master):

$ ./ffmpeg-N-116166-g46f7ea4456-linux64-gpl-7.0/bin/ffmpeg -hide_banner -i video.mp4 -c copy -y video.mkv
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
  Metadata:
    major_brand     : iso9
    minor_version   : 0
    compatible_brands: iso9avc1cmf2cmfcdashclg1
    creation_time   : 2024-05-29T15:34:35.000000Z
  Duration: 482612:01:28.00, start: 1737403256.020000, bitrate: N/A
  Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 3840x2160 [SAR 1:1 DAR 16:9], 24007 kb/s, 50 fps, 50 tbr, 200 tbn (default)
      Metadata:
        creation_time   : 2024-05-29T15:34:35.000000Z
        handler_name    : BBC Video
        vendor_id       : [0][0][0][0]
        encoder         : HEVC Coding
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Output #0, matroska, to 'video.mkv':
  Metadata:
    major_brand     : iso9
    minor_version   : 0
    compatible_brands: iso9avc1cmf2cmfcdashclg1
    encoder         : Lavf61.5.100
  Stream #0:0(und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 24007 kb/s, 50 fps, 50 tbr, 1k tbn (default)
      Metadata:
        creation_time   : 2024-05-29T15:34:35.000000Z
        handler_name    : BBC Video
        vendor_id       : [0][0][0][0]
        encoder         : HEVC Coding
Press [q] to stop, [?] for help
[out#0/matroska @ 0x5cb72bda8100] video:93778KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.032008%
size=   93808KiB time=00:00:31.96 bitrate=24041.2kbits/s speed= 184x

container + stream data:

$ ffprobe -v error -of json -show_format -show_streams video.mp4 | jq
{
  "streams": [
    {
      "index": 0,
      "codec_name": "hevc",
      "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)",
      "profile": "Main 10",
      "codec_type": "video",
      "codec_tag_string": "hev1",
      "codec_tag": "0x31766568",
      "width": 3840,
      "height": 2160,
      "coded_width": 3840,
      "coded_height": 2160,
      "closed_captions": 0,
      "film_grain": 0,
      "has_b_frames": 1,
      "sample_aspect_ratio": "1:1",
      "display_aspect_ratio": "16:9",
      "pix_fmt": "yuv420p10le",
      "level": 153,
      "color_range": "tv",
      "color_space": "bt2020nc",
      "color_transfer": "arib-std-b67",
      "color_primaries": "bt2020",
      "chroma_location": "topleft",
      "refs": 1,
      "view_ids_available": "",
      "view_pos_available": "",
      "id": "0x1",
      "r_frame_rate": "50/1",
      "avg_frame_rate": "50/1",
      "time_base": "1/200",
      "start_pts": 347480651204,
      "start_time": "1737403256.020000",
      "duration_ts": 347480657600,
      "duration": "1737403288.000000",
      "bit_rate": "24007198",
      "extradata_size": 23,
      "disposition": {
        "default": 1,
        "dub": 0,
        "original": 0,
        "comment": 0,
        "lyrics": 0,
        "karaoke": 0,
        "forced": 0,
        "hearing_impaired": 0,
        "visual_impaired": 0,
        "clean_effects": 0,
        "attached_pic": 0,
        "timed_thumbnails": 0,
        "non_diegetic": 0,
        "captions": 0,
        "descriptions": 0,
        "metadata": 0,
        "dependent": 0,
        "still_image": 0,
        "multilayer": 0
      },
      "tags": {
        "creation_time": "2024-05-29T15:34:35.000000Z",
        "language": "und",
        "handler_name": "BBC Video",
        "vendor_id": "[0][0][0][0]",
        "encoder": "HEVC Coding"
      }
    }
  ],
  "format": {
    "filename": "video.mp4",
    "nb_streams": 1,
    "nb_programs": 0,
    "nb_stream_groups": 0,
    "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
    "format_long_name": "QuickTime / MOV",
    "start_time": "1737403256.020000",
    "duration": "1737403288.000000",
    "size": "96049545",
    "probe_score": 100,
    "tags": {
      "major_brand": "iso9",
      "minor_version": "0",
      "compatible_brands": "iso9avc1cmf2cmfcdashclg1",
      "creation_time": "2024-05-29T15:34:35.000000Z"
    }
  }
}
1 2 3 4 5 6 7 8 9 10 11


See also: TracQuery, TracTickets, TracReports

Last modified 3 months ago Last modified on Oct 31, 2024, 5:14:18 PM
Note: See TracWiki for help on using the wiki.