WordPress.org

Making WordPress.org

wiki:TracQuery

Trac Ticket Queries

In addition to reports, Trac provides support for custom ticket queries, used to display lists of tickets meeting a specified set of criteria.

To configure and execute a custom query, switch to the View Tickets module from the navigation bar, and select the Custom Query link.

Filters

When you first go to the query page the default filter will display tickets relevant to you:

  • If logged in then all open tickets it will display open tickets assigned to you.
  • If not logged in but you have specified a name or email address in the preferences then it will display all open tickets where your email (or name if email not defined) is in the CC list.
  • If not logged and no name/email defined in the preferences then all open issues are displayed.

Current filters can be removed by clicking the button to the left with the minus sign on the label. New filters are added from the pulldown lists at the bottom corners of the filters box ('And' conditions on the left, 'Or' conditions on the right). Filters with either a text box or a pulldown menu of options can be added multiple times to perform an or of the criteria.

You can use the fields just below the filters box to group the results based on a field, or display the full description for each ticket.

Once you've edited your filters click the Update button to refresh your results.

Clicking on one of the query results will take you to that ticket. You can navigate through the results by clicking the Next Ticket or Previous Ticket links just below the main menu bar, or click the Back to Query link to return to the query page.

You can safely edit any of the tickets and continue to navigate through the results using the Next/Previous/Back to Query links after saving your results. When you return to the query any tickets which were edited will be displayed with italicized text. If one of the tickets was edited such that it no longer matches the query criteria the text will also be greyed. Lastly, if a new ticket matching the query criteria has been created, it will be shown in bold.

The query results can be refreshed and cleared of these status indicators by clicking the Update button again.

Saving Queries

Trac allows you to save the query as a named query accessible from the reports module. To save a query ensure that you have Updated the view and then click the Save query button displayed beneath the results. You can also save references to queries in Wiki content, as described below.

Note: one way to easily build queries like the ones below, you can build and test the queries in the Custom report module and when ready - click Save query. This will build the query string for you. All you need to do is remove the extra line breaks.

Note: you must have the REPORT_CREATE permission in order to save queries to the list of default reports. The Save query button will only appear if you are logged in as a user that has been granted this permission. If your account does not have permission to create reports, you can still use the methods below to save a query.

You may want to save some queries so that you can come back to them later. You can do this by making a link to the query from any Wiki page.

[query:status=new|assigned|reopened&version=1.0 Active tickets against 1.0]

Which is displayed as:

Active tickets against 1.0

This uses a very simple query language to specify the criteria (see Query Language).

Alternatively, you can copy the query string of a query and paste that into the Wiki link, including the leading ? character:

[query:?status=new&status=assigned&status=reopened&group=owner Assigned tickets by owner]

Which is displayed as:

Assigned tickets by owner

Using the [[TicketQuery]] Macro

The TicketQuery macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.

Example:

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

This is displayed as:

#41
Add "Related" links to support forum posts
#47
Display profile page in order of activity, where someone other than you replied last
#55
Registration for Support Forums is in plain text (not checkbox)
#128
Mix of db table charsets causes bad output from Credits API
#144
Search support threads for a particular theme/plugin
#154
Trac is super narrow on Mobile Safari (iOS)
#173
Add ability to browse code reference
#177
Add cross referencing throughout code reference
#179
Create strong IA/hierarchy for code reference
#190
Restore attachments open by default on Core Trac
#193
Link to report malicious plugins/themes
#236
Bullets in WordPress.org dropdown menus
#241
Forum Site rendered poorly on iOS
#279
responsive formatting hides page content below menu
#301
No cc field on meta.trac
#315
add search box to each plugin´s support forum to search within existing support threads only
#357
Add minimal support to the WordCamp Base theme to allow CSS overrides to be fully responsive
#368
Responsive
#389
Plugins: Approved email for hosting needs to be updated to reference https
#414
Support Forums Registration not case sensitive
#415
Update WordPress logo used in og:image element to improve social media distribution
#438
Mailing lists don't do HTTPS
#444
Layout of theme- and plugin-pages broken in smaller windows
#454
Code Reference: Source code links
#462
Responsive fixes for wordpress.org/mobile
#480
Require a support thread to be submitted when marking a plugin as "Broken"
#483
Mixed content warnings on theme pages cause preview to redirect to new page
#494
View all hooks available in a function
#525
User profile page: Permalinks for "Plugins" and another tabs
#539
Add search bar to interior pages on developer.wordpress.org
#563
Redirect phpdoc.wordpress.org
#569
Handbook: Bad character encoding in Trac article
#570
"WordPress Plugins » Most Popular" not working beyond page 99
#587
Invalid MIME Type at ps.w.org
#597
Display plugin icons on profile pages
#608
Redirect theme and plugin editor function reference to developer.wordpress.org
#617
Inaccessible Profile Icons Have No Text Alternative
#641
Display language download counts public
#650
Invalid Unicode characters at the bottom of Ticket Properties page
#655
Plugin name in Russian in readme.txt
#656
Dashboard RSS error caused by ASCII control codes.
#657
Search bar is not universally present
#669
Favicon is not optimized for retina/HD on wordpress.org
#675
Link to see whole file from patch
#680
Polyglots badge on validators profiles
#722
Add clickability/tooltip to profile badges
#730
the he.wordpress.org dashboard is in english
#744
Rate limit Slack mentions
#759
Keyboard shortcut causing Windows task manager to open
#766
Community calendar on make.wordpress.org for chats
#770
Increase the font size of input, select and textarea elements from 11px to 14px
#817
Add plugin version on forum threads
#818
Add plugin version to plugin reviews
#856
Double check filter results
#884
/wp-admin/options-general.php (compat.php on line 30)
#906
Reintroduce a link to the developer's theme demo
#910
Adding a way to "favorite" themes
#930
Theme Directory UI Update Feedback
#931
User plugin inconsistency
#963
Plugin directory: Missing pagination in certain search views
#995
Download stats API for locale versions
#1000
Emoji stripped from comments when edited on mobile
#1013
OpenGraph for Themes and Plugins
#1022
cyrillic characters not displaying properly in profiles activity
#1033
Floating description checkbox
#1053
Download stats shortcode for locale versions
#1061
Add a Git mirror for meta.svn.wordpress.org
#1129
Forums theme: Multiple current menu item carret highlights
#1136
Forums theme: Responsive design improvements for International Forums
#1140
"Pending" forum reply in stats, but not in topic
#1159
Latest Plugins
#1168
Prevent emails from being sent out before site is live
#1176
Kvetch! Not Loading Random
#1180
Add source code preview to the comment editor
#1205
Make BrowseHappy.com responsive
#1221
Broken anchor in Theme Developer Handbook
#1222
Default locale for translators
#1227
Trac: Add needs-screenshots to workflow keyboards
#1244
Inconsistent style.css references in Theme Directory strings
#1249
Add WPTV badge to dotorg user profiles
#1264
Localised plugin directory titles
#1273
Handbook chapters list doesn't collapse on small screens
#1286
An option to add new users to Rosetta sites without sending an invitation
#1295
Link from speaker-site doesn't work
#1301
Meta Trac Notifications
#1316
Display active installs for plugins on a user's profile page
#1343
Ability to put support topics on a quasy-resolved "awaiting reply" status
#1345
Handbook page revisions are broken
#1348
Plugin Translation Editors and duplicate statuses for the same string translation
#1354
Translation teams page shows the wrong contributors
#1374
Plugin Translation Editors are shown as if they are validator of core
#1380
Lost text without warning when click link in Trac without JavaScript enabled
#1399
Waiting strings are not automatically updated
#1404
Change how translate.wordpres.org works for Plugin and Theme developers
#1410
Zip Builder: generate uniform zip across all build machines
#1420
Toggle Comments doesnt work
#1425
Meta badge not added after receiving props
#1432
Text overflows for on "Create new Ticket" for components with really long names
#1463
Add 'ticket' to reserved terms for Trac mentions
#1485
Enable horizontal scroll for mobile devices on polyglots/teams page
#1489
Fixing i18n functions in make.w.org theme
#1514
Theme uploader: add step to confirm license before upload
#1555
Untranslated plurals are ignored in percentage complete calculations for translation projects
#1583
Oembed Endpoint
#1588
Update Plugin Repo Sidebar Links
#1604
Plugin Stats: Wrong data
#1633
theme card improvement
#1663
Phantom fuzzy strings in contributors table
#1677
TOP 100 plugins/themes translation progress view
#1736
Webservice/endpoint to fetch user profile plugins
#1737
Webservice/endpoint to fetch user profile badges
#1765
GlotPress import: Avoid overwriting current translations
#1772
Active versions: Total not reaching 100% and % sign missing
#1832
back-tick preformatted text in readme.txt not retaining line-breaks in beta plugin directory
#1833
Improve readability FAQ titles and answers
#1835
Plugin Directory: single plugin view -- add indicator when reviews got a response
#1837
Code blocks are reduced to one line
#1838
Improving plugin search
#1844
Approval Email Updated
#1854
Dates in translated plugin changelog are not displayed correctly
#1871
Broken navigation on bbPress 2.x profile
#1879
Rosetta: Local Team Page Template
#1881
https://ja.wordpress.org/support/topic/ permalink 404
#1886
Topic page layout broken on smaller screens
#1895
Cloud tags overlap the wrapped DIV and could overlap content text
#1900
Whitelist wordpress.org links in the number of links that force topic/reply moderation
#1930
Give General Translation Editors access to manually release translations
#1937
Support Forum's answer still considered as spam after status change
#1969
Locale team sites show "Login to Reply" although I'm logged in
#2009
There is a small bug in WordPress.org User Profile ( profiles.wordpress.org site )
#2041
Plugin Review 'link' to support is showing URL instead of linking.
#2046
Subscribe/unsubscribe actions not functioning
#2067
"Topics Started" shows only active topics
#2075
Plugin committer link not working anymore
#2077
Forum RSS feeds aren't linked in the header
#2079
Cannot mark a topic resolved when posting a comment
#2092
Many Google search results for wordpress questions are bringing up dead forum posts (404 Page not found)
#2098
Incorrect meeting date on Upcoming WordPress Meetings
#2105
Feature Request: Introduce Search for plugin specific issues
#2108
Create a routine for update the language packages for WordCamps sites
#2135
Support Forums: old link format doesn't work anymore
#2142
My Speaker Badge Disappeared
#2157
Plugin Directory: "Edit Plugin" link is displayed for non-admins
#2163
Support Theme forum page shows the wrong 'last activity' date/post in the sidebar
#2168
Forum notification emails don't say which plugin they relate to
#2172
Support Theme: 3 up forums list needs consistent CSS units
#2178
Stars to not show in reviews
#2186
Support Theme: Login link missing from new theme
#2220
Trigger a notification for file uploads to Trac
#2230
Missing translation functions for sponsor-payment under "wordcamp-payments" plugin for WordCamp.org
#2233
Missing translation functions for payment-request/input-country.php under "wordcamp payments" plugin
#2234
Missing translation functions for payment-request/metabox-vendor.php under "wordcamp payments" plugin
#2235
Missing translation functions for payment-request/metabox-general.php under "wordcamp payments" plugin
#2237
Missing translation functions for payment-request/metabox-payment.php under "wordcamp payments" plugin
#2240
Translation stats is not displayed for PTEs
#2271
Plugin name not visible in email of postings
#2287
Plugin Directory: "Other Notes" custom sections are not displayed
#2310
Support Theme: Banners cover usernames in spam/pending view
#2324
Poor search result in new plugin directory compared to old directory
#2328
Read More / Read Less button - usability issues
#2352
Support Theme: Add Link to anchor to the new topic form
#2360
Support Theme: Create filter for unresolved topics in plugin/theme forums
#2382
RFE: Plugin review emails should say which plugin it was for
#2404
Introduce obsolete/archived status for plugins
#2426
Ability to reply to a support thread and change resolved status at same time
#2458
WordPress.org: "Download WordPress" might be confused for search submit button
#2511
Enable the Jetpack "Subscribe via Email" widget to Rosetta blog
#2512
Make it clear you can change a plugin review
#2520
Support Forums: Plugin/theme contributors should be able to close a sticky topic
#2561
Support Theme: Add "My Account" section to user profiles
#2607
Showing 'NaN' on plugin statistics
#2640
In WordPress plugin search results author name and URL do not respect meta data from plugin
#2649
Popular plugins pages 100 and above return 404
#2650
Trying to visit one plugin page redirects to another
#2657
Plugin Submissions are temporarily disabled.
#2662
Rating schema missing from plugin directory
#2663
Plugin Directory Admin: Automated Audit Logs for Status Changes
#2682
Add button "Report to moderator" for posts in forums
#2718
Plugin repository does not recognize me as plugin author any more, or allow me to resolve tickets
#2728
Profiles: Add WP locale to notification settings once a user is assigned as a GTE
#2731
Suggestion: Showcase Favorite counts with plugin detail page
#2745
Warning users of unsupported PHP version.
#2746
User Profile name broken if its Japanese
#2752
Plugin directory translations are not updating with subversion commits
#2760
Bring back the "Translate this Plugin" link/button
#2761
Correction needed of placeholder key in gettext string
#2765
No indication of responses to reviews
#2770
Multiline code snippets in markdown broken in changelog
#2775
Follow up button in WordPress User Profile
#2809
Support posts with HTML can break page display
#2824
Changelog Permalink doesn't route to correct location in Plugin Directory
#2832
Search result not working properly
#2834
Give plugin contributors the right to lock a topic, or...
#2840
Abuse of popular list due to active installs count
#2868
Pagination of Plugins on wordpress.org
#2892
Slack: Respect threads when auto-expanding ticket mentions
#2908
WordPress.org paging bug
#2942
Hide resolved topics from no-replies
#2943
Posts and pages on theme preview link to Twenty Seventeen theme when using Safari
#2944
404 on pagination of plugins page
#2949
URL warnings are triggered for w.org URLs when they're within a link element on a translation string
#2971
Special view in translate-wp-org with new pending translations.
#2972
Replace special characters in Vendor Payments and Reimbursement Request plugins automagically
#2973
Allow sorting of attendees by last name
#2995
Page layout break on many pages of Codex.
#3050
The Committers List on a Plugin's advanced page does not have enough padding to stack each line.
#3052
Disable all Edit Flow modules by default for new WordCamp sites
#3055
Missing WordCamp Bangkok organizer badges
#3056
Disappear speaker badge from WordCamp Tokyo 2017 speakers
#3095
A string in plugin directory needs to use _n()
#3097
Add a report mistake button to Translation editors UI
#3125
Swedish localized https://sv.wordpress.org/latest-sv_SE.tar.gz gives old version of WordPress
#3129
Secure link is not added in documentation
#3132
Plugin Directory: Translation of "Short description" is not shown in both directory and in API
#3143
The Translate site no longer lists locales
#3160
Localized short plugin description is not shown on localized plugin directory.
#3167
Charset problem in profile page
#3175
Plugin Directory: Screenshot captions are always displayed in English
#3221
Invalid markup
#3223
Personalized Schedule Builder for WordCamp Attendees
#3232
Missed to define use of $query parameter.
#3242
Wrong reference for the _get_term_hierarchy() function
#3243
Edit the access and display of the Reimbursement section
#3254
Support Question Template
#3258
site-header links are not visible
#3285
No locales are shown on translate.wordpress.org
#3287
'ms_site_not_found' documentation exists in triplicate
#3291
Showcase mobile styling issues

Just like the query: wiki links, the parameter of this macro expects a query string formatted according to the rules of the simple ticket query language. This also allows displaying the link and description of a single ticket:

[[TicketQuery(id=123)]]

This is displayed as:

#123
Rename "Installation" tab on plugins details page

A more compact representation without the ticket summaries is also available:

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

This is displayed as:

#41, #47, #55, #128, #144, #154, #173, #177, #179, #190, #193, #236, #241, #279, #301, #315, #357, #368, #389, #414, #415, #438, #444, #454, #462, #480, #483, #494, #525, #539, #563, #569, #570, #587, #597, #608, #617, #641, #650, #655, #656, #657, #669, #675, #680, #722, #730, #744, #759, #766, #770, #817, #818, #856, #884, #906, #910, #930, #931, #963, #995, #1000, #1013, #1022, #1033, #1053, #1061, #1129, #1136, #1140, #1159, #1168, #1176, #1180, #1205, #1221, #1222, #1227, #1244, #1249, #1264, #1273, #1286, #1295, #1301, #1316, #1343, #1345, #1348, #1354, #1374, #1380, #1399, #1404, #1410, #1420, #1425, #1432, #1463, #1485, #1489, #1514, #1555, #1583, #1588, #1604, #1633, #1663, #1677, #1736, #1737, #1765, #1772, #1832, #1833, #1835, #1837, #1838, #1844, #1854, #1871, #1879, #1881, #1886, #1895, #1900, #1930, #1937, #1969, #2009, #2041, #2046, #2067, #2075, #2077, #2079, #2092, #2098, #2105, #2108, #2135, #2142, #2157, #2163, #2168, #2172, #2178, #2186, #2220, #2230, #2233, #2234, #2235, #2237, #2240, #2271, #2287, #2310, #2324, #2328, #2352, #2360, #2382, #2404, #2426, #2458, #2511, #2512, #2520, #2561, #2607, #2640, #2649, #2650, #2657, #2662, #2663, #2682, #2718, #2728, #2731, #2745, #2746, #2752, #2760, #2761, #2765, #2770, #2775, #2809, #2824, #2832, #2834, #2840, #2868, #2892, #2908, #2942, #2943, #2944, #2949, #2971, #2972, #2973, #2995, #3050, #3052, #3055, #3056, #3095, #3097, #3125, #3129, #3132, #3143, #3160, #3167, #3175, #3221, #3223, #3232, #3242, #3243, #3254, #3258, #3285, #3287, #3291

Finally, if you wish to receive only the number of defects that match the query, use the count parameter.

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

This is displayed as:

228

Customizing the table format

You can also customize the columns displayed in the table format (format=table) by using col=<field> - you can specify multiple fields and what order they are displayed by placing pipes (|) between the columns like below:

[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]

This is displayed as:

Results (1 - 3 of 2587)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#3334 fixed Newer handbooks need a search form SergeyBiryukov
#3333 invalid Update filter counts via javascript while strings being affected garrett-eclipse
#3332 fixed Plugin with untranslated strings showing as 100% due to a few negative values garrett-eclipse
1 2 3 4 5 6 7 8 9 10 11

Full rows

In table format you can also have full rows by using rows=<field> like below:

[[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 2587)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#3334 fixed Newer handbooks need a search form SergeyBiryukov
Description

Background: #1738, #1994.

Some of the team handbooks have a search form at the top of the sidebar: https://make.wordpress.org/core/handbook/ https://make.wordpress.org/themes/handbook/ https://make.wordpress.org/docs/handbook/ https://make.wordpress.org/meta/handbook/ https://make.wordpress.org/polyglots/handbook/ https://make.wordpress.org/support/handbook/

The remaining (newer) handbooks should have it too: https://make.wordpress.org/design/handbook/ https://make.wordpress.org/mobile/handbook/ (see also #3168) https://make.wordpress.org/accessibility/handbook/ https://make.wordpress.org/plugins/handbook/ https://make.wordpress.org/community/handbook/ (does have the form on top-level page, but not on child pages) https://make.wordpress.org/training/handbook/ https://make.wordpress.org/tv/handbook/ (see also #3168) https://make.wordpress.org/cli/handbook/

#3333 invalid Update filter counts via javascript while strings being affected garrett-eclipse
Description

Hello,

I love that the filters now have counts on them; https://i.imgur.com/XF8Q2aG.png

It would be nice if the javascript would update those counts as you were approving/translating strings. I finished the page of strings and thought because of the count there was a few more but in actuality I just had to refresh to see the count update to zero (0).

Thanks

#3332 fixed Plugin with untranslated strings showing as 100% due to a few negative values garrett-eclipse
Description

Hello,

Not sure if this is related to the recent changes but a plugin showed at the top of the list stating 100% but still had strings to translate; Screenshot - https://i.imgur.com/hNd3fCf.png

If you look at the actual plugin (leaving untranslated, hoping no one else does it) translation page it shows negatives which could be why it's 100% or might be rounding up. Plugin Translation Page - https://translate.wordpress.org/locale/en-ca/default/wp-plugins/ninja-forms Screenshot - https://i.imgur.com/v2hDro0.png

Hope that's helpful, Cheers

1 2 3 4 5 6 7 8 9 10 11

Query Language

query: TracLinks and the [[TicketQuery]] macro both use a mini “query language” for specifying query filters. Basically, the filters are separated by ampersands (&). Each filter then consists of the ticket field name, an operator, and one or more values. More than one value are separated by a pipe (|), meaning that the filter matches any of the values. To include a literal & or | in a value, escape the character with a backslash (\).

The available operators are:

= the field content exactly matches one of the values
~= the field content contains one or more of the values
^= the field content starts with one of the values
$= the field content ends with one of the values

All of these operators can also be negated:

!= the field content matches none of the values
!~= the field content does not contain any of the values
!^= the field content does not start with any of the values
!$= the field content does not end with any of the values

The date fields created and modified can be constrained by using the = operator and specifying a value containing two dates separated by two dots (..). Either end of the date range can be left empty, meaning that the corresponding end of the range is open. The date parser understands a few natural date specifications like "3 weeks ago", "last month" and "now", as well as Bugzilla-style date specifications like "1d", "2w", "3m" or "4y" for 1 day, 2 weeks, 3 months and 4 years, respectively. Spaces in date specifications can be left out to avoid having to quote the query string.

created=2007-01-01..2008-01-01 query tickets created in 2007
created=lastmonth..thismonth query tickets created during the previous month
modified=1weekago.. query tickets that have been modified in the last week
modified=..30daysago query tickets that have been inactive for the last 30 days

See also: TracTickets, TracReports, TracGuide

Last modified 5 years ago Last modified on 06/05/13 17:29:27