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: 26 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 28 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 0 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 6 [[TicketQuery(status=assigned,count)]]
Number of invalid tickets: 8 [[TicketQuery(status=closed,resolution=invalid,count)]]
Number of worksforme tickets: 2 [[TicketQuery(status=closed,resolution=worksforme,count)]]
Number of duplicate tickets: 10 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 7 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 91 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 30 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 152 [[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: #139, #151, #152 [[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 somebody David A. Riggs
Summary Update Trac Settings

Format: list

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

This is displayed as:

No results

[[TicketQuery(id=123)]]

This is displayed as:

#123
brew upgrade / reinstall survex fail

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#151 fixed shapefile exports should be 3d Olly Betts Eric C. Landgraf
#149 invalid transform_to_stepfunction issue Olly Betts Isabelle
#148 fixed Terrain not displaying Olly Betts Chris Curry
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 118)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#151 fixed shapefile exports should be 3d Olly Betts Eric C. Landgraf
Description

currently, survexport shapefile exports are only in X,Y coordinates. Many georeferencing applications (for example: color by depth in qgis) depend on the Z coordinate as well.

Survex should export 3d shapefiles, potentially optionally.

Some GDAL-bits from #survex chatter: SHPT=<type>: Override the type of shapefile created. Can be one of NULL for a simple .dbf file with no .shp file, POINT, ARC, POLYGON or MULTIPOINT for 2D; POINTZ, ARCZ, POLYGONZ, MULTIPOINTZ or MULTIPATCH for 3D; POINTM, ARCM, POLYGONM or MULTIPOINTM for measured geometries; and POINTZM, ARCZM, POLYGONZM or MULTIPOINTZM for 3D measured geometries. We want POINTZ and MULTIPOINTZ I think. these are set with a pointer that is the last argument to GDALDatasetCreateLayer()

#149 invalid transform_to_stepfunction issue Olly Betts Isabelle
Description

I am creating a custom explainer for a model I have develop. I have a predict function that returns a vector of survival times. See below. When entering the transform_to_stepfunction, the raw_prediction is simply a vector numeric values. When stepping into this function, I see where the function crashes:

transform_to_stepfunction <- function(predict_function, eval_times = NULL, ..., type = NULL, prediction_element = NULL, times_element = NULL) {

function(model, newdata, times) {

raw_prediction <- predict_function(model, newdata, ...) if (!is.null(times_element)) eval_times <- raw_predictiontimes_element if (!is.null(prediction_element)) prediction <- raw_predictionprediction_element n_rows <- ifelse(is.null(dim(prediction)), 1, nrow(prediction))

Since both times_element and prediction_element are null, the 'prediction' variable is null too, which creashes this function with the message:

"Error in explainer$predict_survival_function(explainer$model, newdata, :

object 'prediction' not found"

How to make this work with a function that returns a vector of survival lengths?

Thank you.

See below my prediction function:

pred_cbr <- function(model, newdata, eval_times) {

test <- newdata all <- alldata[rownames(test) %in% rownames(alldata)] test <- cbind('time' = all[,1], 'status' = all[,2], test) predictions <- CBR_predict(model, test) # list of survival predictions for all test_data samples survivals <- list() for (n in 1:length(predictions)) {

survivals <- c(survivals, list(mean(unlist(predictionsn$survival times))))

} vsurv <- unlist(survivals) return(vsurv)

}

surv_pred_cbr <- transform_to_stepfunction(pred_cbr,

eval_times = times, type="survival")

#148 fixed Terrain not displaying Olly Betts Chris Curry
Description

Terrain seems to have stopped displaying for me in Aven. I have used this feature before (July 2024, so probably on a previous version) but cannot get it working now. I’ve downloaded the relevant .hgt file from Viewfinder Panoramas, and placed it in the folder with the .svx and .3d files. When I select File>Open Terrain, I can select the file and don’t get an error message or anything. The view of the survey ‘flickers’ slightly when toggling the terrain view on and off, as if it’s there but isn’t rendering correctly for some reason? Tried a couple of different surveys in completely different areas and same result. I've tried zipping the file, as I understand earlier versions of Aven required it to be zipped, but still no luck. I’m running Aven 1.2.27 on Mac using Homebrew. System information coped from About Aven below. Any ideas?

Cheers!

Mac OS X (Darwin 24.1.0 x86_64) wxWidgets 3.0.2 Display Depth: 32 bpp (colour) OpenGL 2.1 Metal - 89.3 Apple Apple M4 Pro R8G8B8 Max Texture size: 16384x16384 Max Viewport size: 16384x16384 Smooth Point Size 1.000-64.000 (granularity 0.000) Aliased point size 1.000-64.000 Double buffered: true GL_ARB_color_buffer_float GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_instanced_arrays GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_provoking_vertex GL_ARB_seamless_cube_map GL_ARB_shader_objects GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_sync GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_transpose_matrix GL_ARB_vertex_array_bgra GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_draw_buffers2 GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture_array GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod_bias GL_EXT_texture_rectangle GL_EXT_texture_shared_exponent GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_EXT_transform_feedback GL_EXT_vertex_array_bgra GL_APPLE_aux_depth_stencil GL_APPLE_client_storage GL_APPLE_element_array GL_APPLE_fence GL_APPLE_float_pixels GL_APPLE_flush_buffer_range GL_APPLE_flush_render GL_APPLE_packed_pixels GL_APPLE_pixel_buffer GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_specular_vector GL_APPLE_texture_range GL_APPLE_transform_hint GL_APPLE_vertex_array_object GL_APPLE_vertex_point_size GL_APPLE_vertex_program_evaluators GL_APPLE_ycbcr_422 GL_ATI_separate_stencil GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_IBM_rasterpos_clip GL_NV_blend_square GL_NV_conditional_render GL_NV_depth_clamp GL_NV_fog_distance GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_barrier GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod

1 2 3 4 5 6 7 8 9 10 11


See also: TracQuery, TracTickets, TracReports

Last modified 3 months ago Last modified on Jun 11, 2026, 12:38:13 AM
Note: See TracWiki for help on using the wiki.