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: 2563 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 2634 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 96 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 55 [[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: 4652 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 1075 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 11843 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 2797 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 23998 [[TicketQuery(count)]]
Number of tickets reported or owned by current user: 4096 [[TicketQuery(reporter=$USER,or,owner=$USER,count)]]
Number of tickets created this month: 153 [[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: #25039, #24704, #25148 [[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 21110)

1 2 3 4 5 6 7 8 9 10 11 →
Ticket Resolution Summary Owner Reporter
#25148 duplicate What ImageIO have this problem? team Meongseolin
#25147 fixed [PATCH] Default preferences cache is never saved team wangi
#25145 othersoftware Flatpak version is not up to date team anonymous
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 21110)

1 2 3 4 5 6 7 8 9 10 11 →
Ticket Resolution Summary Owner Reporter
#25148 duplicate What ImageIO have this problem? team Meongseolin
Description

What steps will reproduce the problem?

Revision:19700
Build-Date:2026-11-21 20:12:29

Identification: JOSM/1.5 (19700 zh_CN) Windows 11 64-Bit
OS Build number: Windows 10 Pro 26H2 (26300)
Memory Usage: 600 MB / 12008 MB (271 MB allocated, but free)
Java version: 25.0.5.1+2-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 2560x1600x32bpp@240Hz (scaling 1.25×1.25)
Maximum Screen Size: 2560×1600
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: GBK
Locale info: zh_CN
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.19700, -XX:MaxRAMPercentage=75.0, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --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, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]

Plugins:
+ BetterIME (1.2.0)
+ BetterWorkspace (1.3.5)
+ ImageIO (36483)
+ OHM_Tag_Validator (v0.9.1)
+ PicLayer (275)
+ account_manager (0.3.2)
+ apache-commons (36483)
+ auto_tools (90)
+ buildings_tools (36503)
+ ejml (36483)
+ geotools (36483)
+ importvec (36504)
+ jackson (36502)
+ jaxb (36483)
+ josmtiff (0.1.0)
+ jts (36483)
+ measurement (36503)
+ ohm-date-filter (1726089000)
+ opendata (36503)
+ orbilume (0.4.0)
+ osm-obj-info (72)
+ osmai (1.0)
+ regexreplace (1.0.2)
+ reverter (36503)
+ simple3d (6)
+ urbaneye3d (2.9.3)
+ utilsplugin2 (36503)

Map paint styles:
+ https://raw.githubusercontent.com/yopaseopor/indoormap/master/indoormap-style.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/Admin_Boundaries&zip=1
+ https://raw.githubusercontent.com/Maerek/Better-iD/refs/heads/main/better-id.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1

Last errors/warnings:
- 00325.459 E: 定位影像“reset_camera”时失败
- 00325.460 E: 定位影像“satellite”时失败
- 00325.464 W: No active dataset available for filtering.
- 00325.464 W: No active dataset available for filtering.
- 00348.197 W: 插件 mapwithai 主版本缺失
- 00348.205 W: 插件 mapwithai 主版本缺失
- 00371.174 W: 插件 mapwithai 主版本缺失
- 00371.184 W: 插件 mapwithai 主版本缺失
- 00377.504 E: Handled by bug report queue: org.openstreetmap.josm.tools.JosmRuntimeException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。. 原因: org.xml.sax.SAXParseException: 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。
- 00645.682 E: Handled by bug report queue: org.openstreetmap.josm.tools.JosmRuntimeException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。. 原因: org.xml.sax.SAXParseException: 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:

==== What is the expected result?

==== What happens instead?

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

{{{
Revision:19700
Build-Date:2026-11-21 20:12:29

Identification: JOSM/1.5 (19700 zh_CN) Windows 11 64-Bit
OS Build number: Windows 10 Pro 26H2 (26300)
Memory Usage: 600 MB / 12008 MB (271 MB allocated, but free)
Java version: 25.0.5.1+2-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 2560x1600x32bpp@240Hz (scaling 1.25×1.25)
Maximum Screen Size: 2560×1600
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: GBK
Locale info: zh_CN
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.19700, -XX:MaxRAMPercentage=75.0, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --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, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]

Plugins:
+ BetterIME (1.2.0)
+ BetterWorkspace (1.3.5)
+ ImageIO (36483)
+ OHM_Tag_Validator (v0.9.1)
+ PicLayer (275)
+ account_manager (0.3.2)
+ apache-commons (36483)
+ auto_tools (90)
+ buildings_tools (36503)
+ ejml (36483)
+ geotools (36483)
+ importvec (36504)
+ jackson (36502)
+ jaxb (36483)
+ josmtiff (0.1.0)
+ jts (36483)
+ measurement (36503)
+ ohm-date-filter (1726089000)
+ opendata (36503)
+ orbilume (0.4.0)
+ osm-obj-info (72)
+ osmai (1.0)
+ regexreplace (1.0.2)
+ reverter (36503)
+ simple3d (6)
+ urbaneye3d (2.9.3)
+ utilsplugin2 (36503)

Map paint styles:
+ https://raw.githubusercontent.com/yopaseopor/indoormap/master/indoormap-style.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/Admin_Boundaries&zip=1
+ https://raw.githubusercontent.com/Maerek/Better-iD/refs/heads/main/better-id.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1

Last errors/warnings:
- 00325.459 E: 定位影像“reset_camera”时失败
- 00325.460 E: 定位影像“satellite”时失败
- 00325.464 W: No active dataset available for filtering.
- 00325.464 W: No active dataset available for filtering.
- 00348.197 W: 插件 mapwithai 主版本缺失
- 00348.205 W: 插件 mapwithai 主版本缺失
- 00371.174 W: 插件 mapwithai 主版本缺失
- 00371.184 W: 插件 mapwithai 主版本缺失
- 00377.504 E: Handled by bug report queue: org.openstreetmap.josm.tools.JosmRuntimeException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。. 原因: org.xml.sax.SAXParseException: 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。
- 00645.682 E: Handled by bug report queue: org.openstreetmap.josm.tools.JosmRuntimeException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。. 原因: org.xml.sax.SAXParseException: 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (59) of main
org.openstreetmap.josm.tools.JosmRuntimeException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。
	at org.openstreetmap.josm.plugins.imageio.NexusDownloader.getLatest(NexusDownloader.java:238)
	at org.openstreetmap.josm.plugins.imageio.NexusDownloader.download(NexusDownloader.java:78)
	at org.openstreetmap.josm.plugins.imageio.ImageIOPreferenceSetting.ok(ImageIOPreferenceSetting.java:78)
	at org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane$PluginDownloadAfterTask.run(PreferenceTabbedPane.java:105)
	at org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.savePreferences(PreferenceTabbedPane.java:457)
	at org.openstreetmap.josm.gui.preferences.PreferenceDialog$OKAction.actionPerformed(PreferenceDialog.java:217)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.desktop/java.awt.Dialog.show(Unknown Source)
	at java.desktop/java.awt.Component.show(Unknown Source)
	at java.desktop/java.awt.Component.setVisible(Unknown Source)
	at java.desktop/java.awt.Window.setVisible(Unknown Source)
	at java.desktop/java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.preferences.PreferenceDialog.setVisible(PreferenceDialog.java:145)
	at org.openstreetmap.josm.actions.PreferencesAction.run(PreferencesAction.java:119)
	at org.openstreetmap.josm.actions.PreferencesAction.actionPerformed(PreferencesAction.java:104)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 10; 将功能 "http://apache.org/xml/features/disallow-doctype-decl" 设置为“真”时, 不允许使用 DOCTYPE。
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
	at java.xml/javax.xml.parsers.SAXParser.parse(Unknown Source)
	at org.openstreetmap.josm.plugins.imageio.NexusDownloader.getLatest(NexusDownloader.java:231)
	... 68 more
}}}
#25147 fixed [PATCH] Default preferences cache is never saved team wangi
Description

The default preferences cache is never saved.

What steps will reproduce the problem?

  1. Start JOSM, use it for a while, exit
  2. Look in the cache directory (e.g. ~/.cache/JOSM on Linux)

What is the expected result?

default_preferences.xml is written, so that the next session knows the defaults of all settings, as used by the advanced preferences (#12522) and the colour preferences.

What happens instead?

Only default_preferences.xml_tmp exists, rewritten at every exit. At debug level the log shows:

Invalid preferences file (.../default_preferences.xml_tmp) due to: ParseError at [row,col]:[2,146]
Message: Expected element 'preferences', but got 'preferences-defaults'

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

r19179 (#23802) validates a preferences file before it is backed up or moved into place. Preferences.checkFileValidity() always parses it with new PreferencesReader(file, false), which expects a <preferences> root element. The defaults cache file is written with <preferences-defaults>, so the check fails, the failure is only logged at debug level, and the file is never moved from _tmp to default_preferences.xml. An existing defaults file wouldn't be backed up either, for the same reason.

As a result, since r19179 the advanced preferences only list the defaults of settings used in the current session, and Preferences.loadDefaults() never has a file to read.

Attached is a patch against r19718: save() passes its defaults flag to checkFileValidity(), which parses the file accordingly.

Unit test PreferencesTest.testSaveDefaults: the defaults cache file is saved (not left as _tmp), can be loaded again, and is backed up at the next save. It fails without the patch. The test needs the same temporary preferences directories as testObsoleteOAuth10aTokenIsRemoved, so their setup moved to a directories(Path) helper used by both; that test itself is unchanged, although the diff makes its assertions look moved. All tests in org.openstreetmap.josm.data.Preferences*, org.openstreetmap.josm.data.preferences and org.openstreetmap.josm.gui.preferences.advanced pass; checkstyle and PMD are clean.

#25145 othersoftware Flatpak version is not up to date team anonymous
Description

Hello,

I can't launch JOSM because i'ts not up to date (19613). Which is strange because i'm using the flatpak version, which is supposed to update itself.

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.