wiki:TicketQuery

Version 2 (modified by trac, 6 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: 988 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 988 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 0 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 0 [[TicketQuery(status=assigned,count)]]
Number of invalid tickets: 1244 [[TicketQuery(status=closed,resolution=invalid,count)]]
Number of worksforme tickets: 400 [[TicketQuery(status=closed,resolution=worksforme,count)]]
Number of duplicate tickets: 538 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 805 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 8614 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 1023 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 15520 [[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: 79 [[TicketQuery(created=thismonth..,count)]]
Number of closed Firefox tickets: 0 [[TicketQuery(status=closed,keywords~=firefox,count)]]
Number of closed Opera tickets: 1 [[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: 1 [[TicketQuery(status=closed,keywords~=firefox|opera,count)]]
Number of tickets that affect Firefox or are closed and affect Opera: 1 [[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: #15517, #15519, #13231 [[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 SF/strigeus SF/jackburton
Summary Elayne climb down with no rope (1° room)

Format: list

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

This is displayed as:

No results

[[TicketQuery(id=123)]]

This is displayed as:

#123
MI CD Crashing when loading new rooms...

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

11391 / 12224

patch

1754 / 1755

feature request

1352 / 1541

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#15510 duplicate AGS: 5 Days a stranger crashes with segmentation fault under very specific condition tag2015 antoniou79
#15508 fixed SCUMM: COMI: Invalid read in thumbnail when saving game AndywinXp eriktorbjorn
#15507 fixed SCUMM: FT: ScummEngine_v7::displayDialog() copies random garbage to _charsetColorMap athrxx eriktorbjorn
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 14497)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#15510 duplicate AGS: 5 Days a stranger crashes with segmentation fault under very specific condition tag2015 antoniou79
Description

I could only reliably reproduce this issue with this game only, so it could be specific to this game.

This was tested with the game "5 days a stranger" Special Edition/English on Windows with a recent daily dev build of ScummVM 2.10.0git (windows-x86-64-master-61a93cf8).

Steps to reproduce:

  • Launch the game
  • Wait for the first text to appear on screen ("I don't have a name")
  • Bring up the ScummVM Global Main Menu (GMM) and select "Return to launcher" or "Quit" ("Return to launcher" showcases the issue better)

ScummVM will exit to desktop with a "Segmentation Fault" message.

This will not happen if the player exits the game earlier than that. Also it will not happen if the player skips the intro cutscene and exits from the main menu, or starts a new game and exits from there.

ScummVM 2.8.1 does not seem to have this issue.

#15508 fixed SCUMM: COMI: Invalid read in thumbnail when saving game AndywinXp eriktorbjorn
Description

When I save in The Curse of Monkey Island, using the original save dialog, I get the following Valgrind warning:

==118179== Invalid read of size 4
==118179==    at 0x2B9ABD6: Scumm::ScummEngine_v8::fetchScummVMSaveStateThumbnail(int, bool, int) (saveload.cpp:528)
==118179==    by 0x2B9A43E: Scumm::ScummEngine_v8::stampScreenShot(int, int, int, int, int, int) (saveload.cpp:373)
==118179==    by 0x2B9A279: Scumm::ScummEngine_v8::stampShotDequeue() (saveload.cpp:336)
==118179==    by 0x2BF4CA9: Scumm::ScummEngine::scummLoop(int) (scumm.cpp:2938)
==118179==    by 0x2BF3CCE: Scumm::ScummEngine::go() (scumm.cpp:2606)
==118179==    by 0x2A6C685: Scumm::ScummEngine::run() (scumm.h:585)
==118179==    by 0x2A3828B: runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) (main.cpp:311)
==118179==    by 0x2A3A695: scummvm_main (main.cpp:796)
==118179==    by 0x2A35341: main (posix-main.cpp:44)
==118179==  Address 0x25a92d3e is 38,398 bytes inside a block of size 38,400 alloc'd
==118179==    at 0xA1E09F3: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==118179==    by 0x72C8260: Graphics::Surface::create(short, short, Graphics::PixelFormat const&) (surface.cpp:79)
==118179==    by 0x72DDF0E: Graphics::loadThumbnail(Common::SeekableReadStream&, Graphics::Surface*&, bool) (thumbnail.cpp:179)
==118179==    by 0x2B9AB34: Scumm::ScummEngine_v8::fetchScummVMSaveStateThumbnail(int, bool, int) (saveload.cpp:516)
==118179==    by 0x2B9A43E: Scumm::ScummEngine_v8::stampScreenShot(int, int, int, int, int, int) (saveload.cpp:373)
==118179==    by 0x2B9A279: Scumm::ScummEngine_v8::stampShotDequeue() (saveload.cpp:336)
==118179==    by 0x2BF4CA9: Scumm::ScummEngine::scummLoop(int) (scumm.cpp:2938)
==118179==    by 0x2BF3CCE: Scumm::ScummEngine::go() (scumm.cpp:2606)
==118179==    by 0x2A6C685: Scumm::ScummEngine::run() (scumm.h:585)
==118179==    by 0x2A3828B: runGame(Plugin const*, OSystem&, DetectedGame const&, void const*) (main.cpp:311)
==118179==    by 0x2A3A695: scummvm_main (main.cpp:796)
==118179==    by 0x2A35341: main (posix-main.cpp:44)

I think what may be happening here is that it's reading the last two bytes of the thumbnail buffer, four bytes at a time?

#15507 fixed SCUMM: FT: ScummEngine_v7::displayDialog() copies random garbage to _charsetColorMap athrxx eriktorbjorn
Description

I've been trying to hunt down the cause of Valgrind warnings about uninitialized data when saving in Full Throttle, and I finally think I see what happens, even if I still don't know why.

If I start Full Throttle and skip by the intro cutscenes, it ends up calling ScummEngine_v7::displayDialog() while _charset->getCurID() is -1. That means that this code:

	if (_game.version == 7)
		memcpy(_charsetColorMap, _charsetData[_charset->getCurID()], _game.id == GID_DIG ? sizeof(_charsetColorMap) : 4);

will print whatever is in memory before _charsetData to _charsetColorMap. The same code also appears in ScummEngine_v7::drawBlastTexts() but I don't know if it too can copy random data.

I think this has the potential to be serious enough to warrant a fix before 2.9.0, but I'll admit that this is just a gut feeling.

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.