wiki:TicketQuery

Version 2 (modified by trac, 5 years ago) ( diff )

--

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: 2259 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 2259 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 179 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 0 [[TicketQuery(status=assigned,count)]]
Number of invalid tickets: 1760 [[TicketQuery(status=closed,resolution=invalid,count)]]
Number of worksforme tickets: 268 [[TicketQuery(status=closed,resolution=worksforme,count)]]
Number of duplicate tickets: 567 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 283 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 5095 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 3098 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 11679 [[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: #10591, #6282, #10995 [[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

7472 / 9770

enhancement

1033 / 1750

task

48 / 64

license violation

11 / 74

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#11695 worksforme Configure for armv6 doesn't disable neon and armv6t2. danergo
#11692 fixed [Security] heap-buffer-overflow on alphablend.c:77 Niklas Haas flyfish101
#11686 worksforme [Security] signed integer overflow on libswscale/output.c flyfish101
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 8581)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#11695 worksforme Configure for armv6 doesn't disable neon and armv6t2. danergo
Description

I'm trying to configure ffmpeg for rpi1 (armv6).

First, I have modified this line: https://github.com/FFmpeg/FFmpeg/blob/master/configure#L8021

From echo "ARCH $arch ($cpu)" To echo "ARCH $arch ($cpu) $subarch"

In case I'm doing a configure with these parameters: ./configure --enable-cross-compile --cross-prefix=arm-linux-gnueabihf- --arch=armv6z --cpu=arm1176jzf-s --target-os=linux:

source path               src
C compiler                arm-linux-gnueabihf-gcc
C library                 glibc
host C compiler           gcc
host C library            glibc
ARCH                      arm (arm1176jzf-s) armv6
big-endian                no
runtime cpu detection     yes
ARMv5TE enabled           yes
ARMv6 enabled             yes
ARMv6T2 enabled           yes
VFP enabled               yes
NEON enabled              yes

As you can see: $subarch is printed and it's correctly set to armv6.

However, neither "ARMv6T2" nor NEON are disabled.

#11692 fixed [Security] heap-buffer-overflow on alphablend.c:77 Niklas Haas flyfish101
Description

Summary of the bug:

fuzz@Fuzz2:~/Desktop/projects_oss/FFmpeg/tools/fuzzout/sws_fuzz$ ./target_sws_fuzzer_1519 /home/fuzz/Desktop/projects_oss/FFmpeg/tools/fuzzout/sws_fuzz/out_sws_1519/default/crashes/id:000000,sig:06,src:000005+000654_time:74588_execs:28040_op:splice_rep:8
Reading 168 bytes from /home/fuzz/Desktop/projects_oss/FFmpeg/tools/fuzzout/sws_fuzz/out_sws_1519/default/crashes/id:000000,sig:06,src:000005+000654_time:74588_execs:28040_op:splice_rep:8
4514 x 1 yuva420p9be -> 1 x 1 yuv420p (alphablend: checkerboard)
=================================================================
==3958937==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x625000004c80 at pc 0x555555c49927 bp 0x7fffffffc1d0 sp 0x7fffffffc1c8
READ of size 2 at 0x625000004c80 thread T0
    #0 0x555555c49926 in ff_sws_alphablendaway /home/fuzz/Desktop/projects_oss/FFmpeg/libswscale/alphablend.c:77:57
    #1 0x55555599dfec in scale_internal /home/fuzz/Desktop/projects_oss/FFmpeg/libswscale/swscale.c:1160:15
    #2 0x5555559b35d5 in scale_cascaded /home/fuzz/Desktop/projects_oss/FFmpeg/libswscale/swscale.c:987:15
    #3 0x555555997eef in scale_internal /home/fuzz/Desktop/projects_oss/FFmpeg/libswscale/swscale.c:1056:16
    #4 0x5555559aa66a in sws_scale /home/fuzz/Desktop/projects_oss/FFmpeg/libswscale/swscale.c:1514:12
    #5 0x555555969dd8 in LLVMFuzzerTestOneInput /home/fuzz/Desktop/projects_oss/FFmpeg/tools/./target_sws_fuzzer1519.c:215:5
    #6 0x55555595f37d in ExecuteFilesOnyByOne /home/fuzz/Desktop/DDGF_Project/AFLplusplus/utils/aflpp_driver/aflpp_driver.c:255:7
    #7 0x55555595f188 in LLVMFuzzerRunDriver /home/fuzz/Desktop/DDGF_Project/AFLplusplus/utils/aflpp_driver/aflpp_driver.c
    #8 0x55555595ed48 in main /home/fuzz/Desktop/DDGF_Project/AFLplusplus/utils/aflpp_driver/aflpp_driver.c:300:10
    #9 0x7ffff7c3b082 in __libc_start_main /build/glibc-B3wQXB/glibc-2.31/csu/../csu/libc-start.c:308:16
    #10 0x555555869fdd in _start (/home/fuzz/Desktop/projects_oss/FFmpeg/tools/fuzzout/sws_fuzz/target_sws_fuzzer_1519+0x315fdd)

0x625000004c80 is located 0 bytes to the right of 9088-byte region [0x625000002900,0x625000004c80)
allocated by thread T0 here:
    #0 0x55555591951c in posix_memalign /home/fuzz/Desktop/fuzz-introspector/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x555556376614 in av_malloc /home/fuzz/Desktop/projects_oss/FFmpeg/libavutil/mem.c:107:9
    #2 0x555556377abb in av_mallocz /home/fuzz/Desktop/projects_oss/FFmpeg/libavutil/mem.c:258:17
    #3 0x55555596bb0e in alloc_plane /home/fuzz/Desktop/projects_oss/FFmpeg/tools/./target_sws_fuzzer1519.c:66:23
    #4 0x5555559685b6 in LLVMFuzzerTestOneInput /home/fuzz/Desktop/projects_oss/FFmpeg/tools/./target_sws_fuzzer1519.c:176:11
    #5 0x55555595f37d in ExecuteFilesOnyByOne /home/fuzz/Desktop/DDGF_Project/AFLplusplus/utils/aflpp_driver/aflpp_driver.c:255:7

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/fuzz/Desktop/projects_oss/FFmpeg/libswscale/alphablend.c:77:57 in ff_sws_alphablendaway
Shadow bytes around the buggy address:
  0x0c4a7fff8940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4a7fff8950: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4a7fff8960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4a7fff8970: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4a7fff8980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c4a7fff8990:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff89a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff89b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff89c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff89d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff89e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==3958937==ABORTING
#11686 worksforme [Security] signed integer overflow on libswscale/output.c flyfish101
Description

Summary of the bug: signed integer overflow

version: 722a2170e83231283fc74bede495b3b4ee9591ac OS: Ubuntu 20.04LTS Compiler: clang-14

poc: https://drive.google.com/file/d/1afws3WCzvRBc213jnIMfz_96MFNglGzd/view?usp=sharing

fuzz@Fuzz2:~/Desktop/projects_oss/FFmpeg/tools/fuzzout$ ./target_sws_fuzzer /home/fuzz/Desktop/langgraph/testpro/AFL-Agent/utils_c_389 Reading 339 bytes from /home/fuzz/Desktop/langgraph/testpro/AFL-Agent/utils_c_389 2 x 3 yuva420p10le -> 26 x 3 bgra64le libswscale/output.c:1325:33: runtime error: signed integer overflow: -3421696 * 2048 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/output.c:1325:33 in libswscale/output.c:1325:55: runtime error: signed integer overflow: -3421696 * 2048 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/output.c:1325:55 in libswscale/output.c:1325:44: runtime error: signed integer overflow: 1582301184 + 1582301184 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/output.c:1325:44 in libswscale/output.c:1325:65: runtime error: signed integer overflow: -1130364928 - 1073741824 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/output.c:1325:65 in libswscale/output.c:1326:55: runtime error: signed integer overflow: -3487744 * 2048 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/output.c:1326:55 in libswscale/output.c:1326:44: runtime error: signed integer overflow: 1073739776 + 1447034880 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/output.c:1326:44 in libswscale/output.c:1326:65: runtime error: signed integer overflow: -1774192640 - 1073741824 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/output.c:1326:65 in Execution successful.

1 2 3 4 5 6 7 8 9 10 11


See also: TracQuery, TracTickets, TracReports

Note: See TracWiki for help on using the wiki.