wiki:TicketQuery

Version 3 (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: 23 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 2882 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 95 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 882 [[TicketQuery(status=assigned,count)]]
Number of invalid tickets: 1862 [[TicketQuery(status=closed,resolution=invalid,count)]]
Number of worksforme tickets: 0 [[TicketQuery(status=closed,resolution=worksforme,count)]]
Number of duplicate tickets: 2077 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 0 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 10285 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 35 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 19069 [[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: 46 [[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: #11815, #19012, #14961 [[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 axeld axeld
Summary process group IDs become invalid without a leader

Format: list

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

This is displayed as:

No results

[[TicketQuery(id=123)]]

This is displayed as:

#123
Chart fullscreen function is broken.

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:

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#19259 fixed [kernel] PANIC: _mutex_lock(): double lock of 0xffffffff8c072db0 by thread 49 nobody diver
#19258 invalid Web (epiphany) and Nightely crashes when copy/paste text nobody andianton
#19257 fixed HaikuDepot - search did not include package description (regression) apl-haiku un_spacyar
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 15158)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#19259 fixed [kernel] PANIC: _mutex_lock(): double lock of 0xffffffff8c072db0 by thread 49 nobody diver
Description

Updated from hrev58330 to hrev58344 in VMware Workstation 17.6.1 and now it crashes on boot:

KERN: PANIC: _mutex_lock(): double lock of 0xffffffff8c072db0 by thread 49
KERN: Welcome to Kernel Debugging Land...
KERN: Thread 49 "mount_server" running on CPU 0
KERN: stack trace for thread 49 "mount_server"
KERN:     kernel stack: 0xffffffff81a41000 to 0xffffffff81a46000
KERN:       user stack: 0x00007f799e840000 to 0x00007f799f840000
KERN: frame                       caller             <image>:function + offset
KERN:  0 ffffffff81a45490 (+  32) ffffffff801526b0   <kernel_x86_64> arch_debug_call_with_fault_handler + 0x1a
KERN:  1 ffffffff81a454e0 (+  80) ffffffff800b8388   <kernel_x86_64> debug_call_with_fault_handler + 0x78
KERN:  2 ffffffff81a45540 (+  96) ffffffff800b9a74   <kernel_x86_64> kernel_debugger_loop(char const*, char const*, __va_list_tag*, int) + 0xf4
KERN:  3 ffffffff81a45590 (+  80) ffffffff800b9e0e   <kernel_x86_64> kernel_debugger_internal(char const*, char const*, __va_list_tag*, int) + 0x6e
KERN:  4 ffffffff81a45680 (+ 240) ffffffff800ba1a7   <kernel_x86_64> panic + 0xb7
KERN:  5 ffffffff81a456d0 (+  80) ffffffff8009d671   <kernel_x86_64> _mutex_lock(mutex*, void*) + 0x281
KERN:  6 ffffffff81a45730 (+  96) ffffffff8004f5a2   <kernel_x86_64> _GLOBAL__N_1::BlockPrefetcher::IterativeIOFinishedHook(void*, IORequest*, int, bool, unsigned long) + 0x42
KERN:  7 ffffffff81a45770 (+  64) ffffffff800ff792   <kernel_x86_64> do_iterative_fd_io_finish(void*, IORequest*, int, bool, unsigned long) + 0x32
KERN:  8 ffffffff81a457f0 (+ 128) ffffffff800dcc30   <kernel_x86_64> IORequest::NotifyFinished() + 0x150
KERN:  9 ffffffff81a45870 (+ 128) ffffffff800dcc50   <kernel_x86_64> IORequest::NotifyFinished() + 0x170
KERN: 10 ffffffff81a458d0 (+  96) ffffffff800dae80   <kernel_x86_64> IOCache::ScheduleRequest(IORequest*) + 0xd0
KERN: 11 ffffffff81a45920 (+  80) ffffffff801134a6   <kernel_x86_64> vfs_vnode_io + 0x36
KERN: 12 ffffffff81a45a10 (+ 240) ffffffff8011375a   <kernel_x86_64> do_iterative_fd_io_iterate(void*, IORequest*, bool*) + 0x25a
KERN: 13 ffffffff81a45a70 (+  96) ffffffff80113b46   <kernel_x86_64> do_iterative_fd_io + 0xe6
KERN: 14 ffffffff81a45ae0 (+ 112) ffffffff80056fda   <kernel_x86_64> block_cache_prefetch + 0x5ba
KERN: 15 ffffffff81a45bb0 (+ 208) ffffffff81f725bb   <fat> dosfs_mount(fs_volume*, char const*, unsigned int, char const*, long*) + 0xeab
KERN: 16 ffffffff81a45d90 (+ 480) ffffffff80109025   <kernel_x86_64> fs_mount(char*, char const*, char const*, unsigned int, char const*, bool) + 0x805
KERN: 17 ffffffff81a45f20 (+ 400) ffffffff8011011e   <kernel_x86_64> _user_mount + 0x22e
KERN: 18 ffffffff81a45f30 (+  16) ffffffff8015428f   <kernel_x86_64> x86_64_syscall_entry + 0xfb
KERN: user iframe at 0xffffffff81a45f30 (end = 0xffffffff81a45ff8)
KERN:  rax 0x69                  rbx 0x7f799f83eea0        rcx 0xe762c59bac
KERN:  rdx 0x0                   rsi 0x1060355197d0        rdi 0x1060354c7780
KERN:  rbp 0x7f799f83ef00         r8 0x0                    r9 0x0
KERN:  r10 0x1                   r11 0x206                 r12 0x1060354d3e80
KERN:  r13 0x1                   r14 0x7f799f83ee40        r15 0x1060354c7780
KERN:  rip 0xe762c59bac          rsp 0x7f799f83ee08     rflags 0x206
KERN:  vector: 0x63, error code: 0x0
KERN: 19 00007f799f83ef00 (+   0) 000000e762c59bac   <libroot.so> _kern_mount + 0x0c
KERN: 20 00007f799f83ef20 (+  32) 0000008e78b70e85   <_APP_> MountArchivedVisitor::~MountArchivedVisitor() + 0x65
KERN: 21 00007f799f83f0a0 (+ 384) 0000008e78b721b4   <_APP_> AutoMounter::_MountVolumes(mount_mode, mount_mode, bool, int) + 0x124
KERN: 22 00007f799f83f120 (+ 128) 0000008e78b72234   <_APP_> AutoMounter::ReadyToRun() + 0x34
KERN: 23 00007f799f83f370 (+ 592) 00000052ced5b397   <libbe.so> BApplication::DispatchMessage(BMessage*, BHandler*) + 0x467
KERN: 24 00007f799f83f3c0 (+  80) 00000052ced631d4   <libbe.so> BLooper::task_looper() + 0x294
KERN: 25 00007f799f83f3e0 (+  32) 00000052ced58151   <libbe.so> BApplication::Run() + 0x21
KERN: 26 00007f799f83f660 (+ 640) 0000008e78b70c45   <_APP_> main + 0x25
KERN: 27 00007f799f83f690 (+  48) 0000008e78b70d8e   <_APP_> _start + 0x3e
KERN: 28 00007f799f83f6c0 (+  48) 00000103f03f6e95   </boot/system/runtime_loader@0x00000103f03e7000> <unknown> + 0xfe95
KERN: 29 0000000000000000 (+   0) 00007fdf85ee7258   <commpage> commpage_thread_exit + 0x00
#19258 invalid Web (epiphany) and Nightely crashes when copy/paste text nobody andianton
Description

When you try to copy/paste text from the serch bar, both apps crashes.

Steps to repro the issue:

  • open web (epiphany)
  • write something în search bar (it doesnt matter what)
  • select text and copy
  • then try to paste it in the search bar
  • notice the crash

Note: this happens both on web app and nightly

#19257 fixed HaikuDepot - search did not include package description (regression) apl-haiku un_spacyar
Description

Since a few nightlies, looks like the search function in HaikuDepot did not include the package description. For example, if I search for "emulator", it only shows the package that include "emulator" as part of the package name,but ignores the ones that include the search keyword as part of the package description.

Please, check the attached pictures, where I compare the search function within HaikuDepot, with the ones done from the HaikuDepot web interface.

Haiku hrev58305 (32 bit version)

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.