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: 2565 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 2639 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 96 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 56 [[TicketQuery(status=assigned,count)]]
Number of invalid tickets: 747 [[TicketQuery(status=closed,resolution=invalid,count)]]
Number of worksforme tickets: 1205 [[TicketQuery(status=closed,resolution=worksforme,count)]]
Number of duplicate tickets: 4651 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 1074 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 11834 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 2799 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 23991 [[TicketQuery(count)]]
Number of tickets reported or owned by current user: 4095 [[TicketQuery(reporter=$USER,or,owner=$USER,count)]]
Number of tickets created this month: 146 [[TicketQuery(created=thismonth..,count)]]
Number of closed Firefox tickets: 1 [[TicketQuery(status=closed,keywords~=firefox,count)]]
Number of closed Opera tickets: 11 [[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: 12 [[TicketQuery(status=closed,keywords~=firefox|opera,count)]]
Number of tickets that affect Firefox or are closed and affect Opera: 12 [[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: #24928, #25141, #25133 [[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 imi imi
Summary Import of background images from an image server

Format: list

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

This is displayed as:

No results

[[TicketQuery(id=123)]]

This is displayed as:

#123
Plugin actions cannot be registered and put in the toolbar

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

1 2 3 4 5 6 7 8 9 10 11 →
Ticket Resolution Summary Owner Reporter
#25141 fixed [PATCH] Debug logs & status report contain credentials team wangi
#25138 duplicate no se puede ingresar team anonymous
#25131 fixed latest tested release (19700) macOS build isn't notarized rinsuki
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 21097)

1 2 3 4 5 6 7 8 9 10 11 →
Ticket Resolution Summary Owner Reporter
#25141 fixed [PATCH] Debug logs & status report contain credentials team wangi
Description

The debug logs and status report contain credentials: Authorization header, cookies, OAuth client secret, API keys. With --debug, HttpClient logs the request and response headers as they are:

FINE: REQUEST HEADERS: {Accept=application/xml, */*;q=0.8, Accept-Encoding=gzip, deflate, Authorization=Bearer <the OAuth 2.0 access token>}

So the log holds the credentials of every authenticated request: the OAuth 2.0 bearer token, or with basic authentication the base64 of user name and password, which is the password in all but name. Proxy-Authorization is logged the same way, and the response headers show session cookies in Set-Cookie. With --trace, the body of a request is logged as it is too; for an OAuth 2.0 token request that is the client secret, the authorization code and its verifier, or a refresh token.

Debug and trace logs are what users can be asked for when something goes wrong, and they end up in public tickets: searching Trac for "REQUEST HEADERS" finds over a dozen tickets with such logs, not counting attached log files, which Trac search does not cover. Some of the logs posted had the token removed by hand, but not all. We shouldn't allow such leaks to be easy.

The status report shows every preference value as it is but for user names, passwords and access tokens, which are left out; so an API key written into the URL of a custom imagery entry, for example, is posted with every bug report.

Remote Control logs every request it receives at info level, so the redirect of an OAuth 2.0 authorization, with its authorization code, is in every log, not only debug ones. The code is short-lived and useless without the PKCE verifier, but it does not belong there either.

#21756 stripped credentials from the URLs in the log (r18407), and r18652 moved that into TextUtils.stripUrl(); the headers and the body were not covered. The attached patch keeps all of it in TextUtils:

  • stripUrl() also strips secret, password, verifier and code (the latter as a whole parameter name only, so that e.g. a postcode is kept), in addition to token, key and connectId, and a value now ends at white space too, so that the rest of a log line is kept;
  • a form-encoded request body has the syntax of a query, so HttpClient logs it at trace level through stripUrl(): that covers client_secret, code, code_verifier, refresh_token and password of OAuth 2.0 token requests; other bodies are logged as before;
  • new stripHeaders() replaces the values of Authorization and Proxy-Authorization with ...stripped..., but keeps the scheme, so that the log still says what kind of authentication was used (Authorization=Bearer ...stripped...), and replaces the values of Cookie and Set-Cookie entirely; HttpClient logs request and response headers through it;
  • the URL of a request with a body is logged through stripUrl(), as the other requests already were, and so is the request line received by Remote Control;
  • the status report passes each string of a preference value through stripUrl(), inside lists and maps too.

New TextUtilsTest covers both functions. HttpClientCredentialsLoggingTest makes requests to a local WireMock server at trace level with a bearer token, a session cookie and a token request, and checks that none of them appear in the log while the scheme does; a new case in RemoteControlTest sends an authorization redirect and checks that the code is not logged; new ShowStatusReportActionTest checks the preference values, among them a custom imagery entry. Each fails if the corresponding logging call goes back to logging the values. Checkstyle and PMD are clean for the change.

#25138 duplicate no se puede ingresar team anonymous
Description

What steps will reproduce the problem?

What is the expected result?

What happens instead?

Please provide any additional information below. Attach a screenshot if possible.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2026-08-11 15:36:21 +0200 (Tue, 11 Aug 2026)
Revision:19613
Build-Date:2026-08-12 01:30:51
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19613 es) Linux Freedesktop SDK 26.08 (Flatpak runtime)
Memory Usage: 256 MB / 8520 MB (94 MB allocated, but free)
Java version: 21.0.12.1, Flathub, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920x1080x[Multi depth]@60Hz (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: es_PA.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: es_PA
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: XFCE
VM arguments: [--module-path=/app/share/openjfx/lib, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, -Djosm.restart=true, -Djava.net.useSystemProxies=true, -XX:MaxRAMPercentage=75.0, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED]

Last errors/warnings:
- 00000.780 W: Versión principal del componente ausente en mapwithai
- 00001.178 W: Versión principal del componente ausente en mapwithai
- 00002.811 E: Handled by bug report queue: java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class jakarta.json.JsonArray (org.eclipse.parsson.JsonStringImpl and jakarta.json.JsonArray are in unnamed module of loader 'app')



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: main (1)
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class jakarta.json.JsonArray (org.eclipse.parsson.JsonStringImpl and jakarta.json.JsonArray are in unnamed module of loader 'app')
	at org.eclipse.parsson.JsonObjectBuilderImpl$JsonObjectImpl.getJsonArray(JsonObjectBuilderImpl.java:229)
	at org.openstreetmap.josm.tools.Territories.lambda$initializeExternalData$1(Territories.java:204)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.openstreetmap.josm.tools.Territories.lambda$initializeExternalData$2(Territories.java:203)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.openstreetmap.josm.tools.Territories.initializeExternalData(Territories.java:201)
	at org.openstreetmap.josm.tools.Territories.initializeExternalData(Territories.java:190)
	at org.openstreetmap.josm.tools.Territories.initialize(Territories.java:124)
	at org.openstreetmap.josm.gui.MainInitialization.lambda$beforeInitializationTasks$4(MainInitialization.java:85)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33)
	at org.openstreetmap.josm.spi.lifecycle.Lifecycle.runInitializationTasks(Lifecycle.java:108)
	at org.openstreetmap.josm.spi.lifecycle.Lifecycle.initialize(Lifecycle.java:73)
	at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:1004)
	at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:280)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:766)
#25131 fixed latest tested release (19700) macOS build isn't notarized rinsuki
Description

Current tested (19700-tested, ​https://github.com/JOSM/josm/releases/tag/19700-tested ) release can't be opened in macOS 27.2.1 (26B131) because it isn't notarized.

according to ​https://github.com/JOSM/josm/actions/runs/44933097964/job/136970050256

Conducting pre-submission checks for JOSM_25_arm64.zip and initiating connection to the Apple notary service...
Error: HTTP status code: 403. A required agreement is missing or has expired. This request requires an in-effect agreement that has not been signed or has expired. Ensure your team has signed the necessary legal agreements and that they are not expired.
Error: Process completed with exit code 1.

I think you (or someone at FOSSGIS?) need to sign in to the ​https://developer.apple.com and accept updated TOS, then release new (tested) release.

1 2 3 4 5 6 7 8 9 10 11 →


See also: TracQuery, TracTickets, TracReports

Last modified 3 years ago Last modified on 2023-12-28T13:06:05+01:00
Note: See TracWiki for help on using the wiki.