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: 709 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 709 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 19 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 24 [[TicketQuery(status=assigned,count)]]
Number of invalid tickets: 320 [[TicketQuery(status=closed,resolution=invalid,count)]]
Number of worksforme tickets: 203 [[TicketQuery(status=closed,resolution=worksforme,count)]]
Number of duplicate tickets: 125 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 122 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 804 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 765 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 2366 [[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: 0 [[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: #748, #2381, #2372 [[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 alex@… gabor@…
Summary ao alsa is noisy since it was "unified"

Format: list

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

This is displayed as:

No results

[[TicketQuery(id=123)]]

This is displayed as:

#123
mplayer installation OPRE5 requested

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

1493 / 2140

enhancement

107 / 199

task

1 / 1

license violation

0 / 2

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#2376 duplicate Error during build beastd Yury
#2375 fixed FFmpeg 4.4 "Rao" API changes break build beastd bug
#2373 fixed build from SVN is broken on Arch Linux beastd glitsj16
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 1601)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#2376 duplicate Error during build beastd Yury
Description

Latest mplayer from SVN could not be build due to errors in ve_lavc.c:

gcc11 -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Werror-implicit-function-declaration -D_ISOC99_SOURCE -I. -Iffmpeg -O3 -march=native -mtune=native -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -march=bdver2 -fstack-protector-strong -fomit-frame-pointer -fbranch-count-reg -fforce-addr -fno-finite-math-only -fPIC -DPIC -I/usr/local/include -I/usr/include -I/usr/include/openssl -fpie -DPIC -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include/ -I/usr/local/include/openjpeg-2.4 -I/usr/local/include -D_REENTRANT -I/usr/local/include -I/usr/local/include/freetype2 -DZLIB_CONST -I/usr/local/include/opus -I/usr/local/include/bs2b -I/usr/local/include/libxml2 -I/usr/local/include -D_THREAD_SAFE -c -o libmpcodecs/ve_lavc.o libmpcodecs/ve_lavc.c libmpcodecs/ve_lavc.c:102:42: error: 'FF_PRED_LEFT' undeclared here (not in a function)

102 | static int lavc_param_prediction_method= FF_PRED_LEFT;

| ~

libmpcodecs/ve_lavc.c: In function 'config': libmpcodecs/ve_lavc.c:347:22: error: 'AVCodecContext' has no member named 'b_frame_strategy'

347 | lavc_venc_context->b_frame_strategy= lavc_param_vb_strategy;

| ~

libmpcodecs/ve_lavc.c:349:22: error: 'AVCodecContext' has no member named 'rtp_payload_size'

349 | lavc_venc_context->rtp_payload_size= lavc_param_packet_size;

| ~

...

Although mplayer is built actually and working, but not mencoder and errors are shown.

#2375 fixed FFmpeg 4.4 "Rao" API changes break build beastd bug
Description

Summary of the bug:

ffmpeg API changes break builds in the following files:

libmpcodecs/ad_spdif.c libmpdemux/demux_lavf.c sub/av_sub.c libmpcodecs/vf_uspp.c:

Has this been discussed anywhere else? Is this a duplicate?

How to reproduce: (e.g.: AVStream API change)

Fresh checkout: svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

Build pipeline: svn update && nice -- ./configure && nice -- make

At revision 38305. No FFmpeg checkout, press enter to download one with git or CTRL+C to abort

Cloning into 'ffmpeg'...

...

cc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=native -mtune=native -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -w -fpie -DPIC -D_REENTRANT -I/usr/include/p11-kit-1 -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -D_REENTRANT -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -DZLIB_CONST -I/usr/include/libxml2 -c -o libmpcodecs/ad_spdif.o libmpcodecs/ad_spdif.c libmpcodecs/ad_spdif.c: In function 'init': libmpcodecs/ad_spdif.c:129:33: error: 'AVStream' has no member named 'codec'

129 | lavf_ctx->streams[0]->codec->codec_id = fmt_id_type[i].id;

| ~

libmpcodecs/ad_spdif.c:164:33: error: 'AVStream' has no member named 'codec'

164 | switch (lavf_ctx->streams[0]->codec->codec_id) {

| ~

make: * [Makefile:728: libmpcodecs/ad_spdif.o] Error 1

#2373 fixed build from SVN is broken on Arch Linux beastd glitsj16
Description

Summary of the bug:

Hi, when trying to build mplayer from SVN on Arch Linux the below error is thrown and compilation halts:

error: libavutil/mem_internal.h file not found

Checking my system for that file confirms it does not exist. Suspecting this might be related to the ffmpeg version installed on Arch Linux, I stumbled on:

avcodec/tableprint: Don't include mem_internal.h https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/da607832b57607fe9221bc2ecd25ea25ef6dd3aa

Here's my System Information

Your Linux distribution or operating system and version:

Arch Linux

kernel version: $ uname -a Linux lab16 5.10.13-1-ck-core2 #1 SMP PREEMPT Thu, 04 Feb 2021 23:50:08 +0000 x86_64 GNU/Linux

libc version: $ ls -l /lib/libc[.-]* -rwxr-xr-x 1 root root 2154488 Feb 6 01:09 /lib/libc-2.33.so -rw-r--r-- 1 root root 5286104 Feb 6 01:09 /lib/libc.a -rw-r--r-- 1 root root 255 Feb 6 01:09 /lib/libc.so lrwxrwxrwx 1 root root 12 Feb 6 01:09 /lib/libc.so.6 -> libc-2.33.so

gcc and ld versions: $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl --with-linker-hash-style=gnu --with-system-zlib --enable-cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror gdc_include_dir=/usr/include/dlang/gdc Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (GCC) $ ld -v GNU ld (GNU Binutils) 2.36

binutils version: $ as --version GNU assembler (GNU Binutils) 2.36 Copyright (C) 2021 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of \`x86_64-pc-linux-gnu\'.

ffmpeg version: $ pacman -Q ffmpeg ffmpeg 2:4.3.1-4

config.h: https://gist.github.com/glitsj16/ecaee6302f39f6000a9437534d19f448 config.log: https://gist.github.com/glitsj16/f3a91e8a147869cd728dc9f8de2d7674 config.mak: https://gist.github.com/glitsj16/13f951e85d74e79b6eb2c12969bfd68e

build log: https://gist.github.com/glitsj16/a7f9b8429c223ce05aad8626e5a7a852

HTH, glitsj16

1 2 3 4 5 6 7 8 9 10 11


See also: TracQuery, TracTickets, TracReports

Last modified 9 months ago Last modified on Apr 17, 2021, 5:42:02 PM
Note: See TracWiki for help on using the wiki.