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:

#78
[meta] ChimeraScript
#113
Look into improving "conversions" when people submit reports that are known issues
#187
Adblock Plus for Chrome extension conflicting with Hangouts
#205
Replacing "ChinaList" with "EasyList China" in Chrome, Opera, Safari, IE and Android
#207
[trac] Review text box width too small
#217
Avoid main-thread IO in ABP for Firefox
#218
First-run page opens after each dev build update
#263
Links to issues in changelog for dev builds are wrong
#278
Add a pre-configurable option to disable the first run page in Chrome
#313
Renable WeakMaps
#319
[chrome] class not hidden
#323
notificación errónea
#329
Issue links in changelogs should point to the issue tracker, not MozDev
#330
Android version not working on x86 RAZR i
#334
Make donation page compatible with all supported platforms
#357
SeaMonkey - Adblock Plus icon cannot be removed from the toolbar
#377
Remove update_url from Chrome devbuilds
#400
Generate update manifests for Internet Explorer releases
#405
IE11 - finance.yahoo.com
#422
Safari displays white blank pages
#423
ADB obviously blocks all Websites in Safari
#425
freeze safari and white page
#426
Adblock Warning Removal List gets disabled after extension update.
#429
Investigate whether inline scripts can be blocked
#436
Adblock plus launches too late so my restored firefox tabs now show ads
#439
Ads aren't blocked in Opera's speed dial thumbnails
#441
ABP doesn't block youtube adverts
#452
Adblock Plus for Chrome adding shadow dom breaks CSS transitions
#474
[IE 11 Chinese] Chinalist cannot be selected
#480
AdBlock Plus 1.8 momentarily and regularly freezes Chrome
#482
Chrome: POST-form returning a PDF makes an additional GET request
#501
PDFs generated by POST requests broken in Chrome
#504
Youtube freezes (Chrome)
#511
Youtube video freezes at 2-3 seconds mark, resumes at 5-6 mark. audio is not effected.
#551
Prevent hidden "ADD" button by moving it left
#566
Navigation bar on adblockplus.org broken on mobile
#583
ABP for IE experimental 1.2 makes IE8 at Win XP hang right after startup
#592
Adblock doesn't retain the addition of some new filters
#607
ALL websites show as TEXT ONLY on Firefox (windows) as from 10am GMT June 2nd 2014
#617
bad "Block element" behaviour
#619
duplicate 618
#636
ABP should remove Chrome's error message in some blocked iframes
#659
XML page not loaded, ABP 1.8.3, chrome 35
#668
adblock for safari ads spam to the email in outlook
#679
Ads show on session restored pages until page reload.
#691
Installer is not able to close the IE and Engine
#694
Ads stop being blocked sometimes
#709
Block element dialog removes clicked instead matching element
#717
Anti-Adblock script detects ABP despite "disable on page"
#747
ABP needs serious optimization
#759
High memory usage on page with 390 iframes
#1088
$document, $elemhide and element hiding exceptions don't fully cancel hiding rules
#1124
'Block element' overlays are shown in unexpected places
#1126
ABP for Android & ABP for Firefox for Android need 2 changes
#1135
Filter Subscription is not maintained when toggling between enable and disable
#1139
"Icon and text" setting duplicates toolbar icon text in the Australis menu
#1150
When a page is refreshed the ABP icon changes it position during refresh
#1153
Language dropdown is empty in Adblock Plus Options in IE 8
#1159
Some adserver resources are not blocked
#1219
ABP 1.2.690 - youtube, I can't logout or access profile
#1223
Installation Page : The g logo icon is missing when the Remove social media button is turned on
#1253
ABP Firefox is able to block ads on http://www.london24.com/ but not Chrome ABP
#1255
Social buttons broken on first-run page when activating social blocking list
#1261
Blank page on kvk.nl w/ EasyPrivacy
#1272
Request blocking is active on options and first run page leading to JavaScript errors
#1276
Filter Subscription radio buttons are not seen after disabling and enabling Adblock Plus on Firefox 31.0 Android 4.1.1
#1278
Allow some non-intrusive advertising option is not maintained with ABP disable and enable on Mobile Firefox.
#1291
Block element(Right click menu item) does not function on chrome webstore page
#1293
Details under Malware blocking is not visible
#1323
Blocked elements counter increases without stopping
#1332
Disable on this site for this session (temporary, self-deleting whitelist filters)
#1333
IE are not getting closed while uninstall
#1336
Installer continue asking to close IE though it has been closed
#1340
ABP is not enabled by unchecking disable website option for a website which is added manually through manage option
#1341
ABP for IE version incorrect from Control panel
#1343
"Block Element" suggests wrong URL for Cookery site logo image and thus it does not get blocked
#1346
svg bitmap images blocking does not work properly
#1348
Blocked tv.com search box element reappears on page refresh
#1350
Lots of "got unexpected message:" errors in console for options page
#1367
Element Hiding Helper (EHH) doesn't work with Electrolysis (e10s)
#1373
Extra click is require to add filter for block element on redbus site
#1394
Not able to block element on ebay website
#1395
Block element does not work well yahoo mail sigin
#1422
Add a way to subscribe to any known filter list in Chrome, Opera and Safari
#1432
Block element behavior is NOT proper on XML content page
#1443
Block element dialog is cut off if shown in a small frame
#1482
Privacy and security issue: Disable tracking and malware doesn't work reliably
#1536
Replace ABP icon with new one (v.1.1) - for Opera
#1572
Remove buildtools references to timeline.js
#1615
ABP for IE Dev build v1.2.723 not blocking some ads
#1627
Add filter pop-up doesnot appear for blocking in case of dynamic content
#1636
Button blocking behavior is improper
#1638
latest devbuild crashing IE
#1718
Limit workaround for Chrome bug breaking Flash videos to Chrome 38-40
#1726
Problem on the forum
#1728
ABP for IE 1.3 still blocking site even when "disable everywhere"
#1741
"Block element" dialog doesn't work while first run page is open
#1746
Page does not reloads automatically when ABP 'Disable everywhere' option is deselected
#1749
Cannot add "@@||163.com^$document" in ABP for google chrome
#1752
images at https://acceptableads.org/ cannot be loaded
#1792
Block element can not select elements inside srcdoc iframe
#1845
Blocking functionality doesn't always work in Adblock Plus for Maxthon
#1858
There is no option available in contect menu for blocking images
#1881
Show rating of Adblock Plus in the Google search results
#1886
Disabling Acceptable Ads doesn't do anything
#1915
Ads count mismatch in ABP icon and ABP menu
#1923
Latest URLs for IE devbuild point to outdated version
#1930
Functions of "Disable Tracking", "Disable Malware Domains" and "Disable Social Media Buttons" are not work in Maxthon Browser
#1931
Button "On/Off" switch off only function Adblock
#1936
ABP settings for whitelisting overrides the manual user settings on webapge
#1939
Whitelisted domains list/Manage list is case sensitive even though domain names are case insensitive.
#1991
Problem with Polish Characters
#2013
Replace "for each" loops with "for of" loops (Buildtools)
#2025
Add link to show which URLs were blocked on this page
#2026
Allow updating individual lists too
#2028
Allow adding personal list URLs in Android
#2030
Adblock haven't localization in Maxthon Browser v4.4.4.2000
#2091
[cms] Allow defining custom functions in the website repository
#2107
Prettifying sharing an ABP blog post
#2124
Installer cannot close IE
#2149
Add proper support for nsIContentPolicy.TYPE_IMAGESET
#2153
Improve ENC by removing hiera/private requirement
#2207
Add filter dialog does not appear and contains incorrect filter
#2210
Page become unresponsive when selecting Google play element for blocking
#2226
No issue report e-mails are being sent to filter list authors
#2314
Replace Exec["fetch_sitescripts"] with Class["sitescripts"]
#2316
Not able to block Feedback button
#2321
Issue Reports Database not showing "exceptionrules
#2350
Remove Add-ons, Apps and Sync
#2363
[adblockplus.org Anwiki to CMS migration] Translation parts without an English correspondence were dropped
#2391
Create a new filter class for CSS property filters
#2411
Make tooltips on new options page more accessible
#2529
ABP logo overlaps header links in some RTL languages
#2570
Microsoft Edge on Windows 10 Mobile is detected as Android
#2573
ABP broken if -user-agent is set as a startup parameter
#2601
AdBlock Plus unresponsive when starting chrome
#2608
Update libadblockplus dependency to revision 8193b978a2c2
#2616
Misspelled 'wanto'
#2641
Filter behavior change introduces regression breaking notifications
#2657
Investigate to support a way to stop website redirect's
#2670
Wrap header, footer and nav content with corresponding tags
#2680
Decommission filter11.adblockplus.org
#2716
Adblock Browser doesn't support any language other than English
#2743
[Adblock Plus for Chrome] "Add filter" dialog not triggered when blocking an embedded ad
#2745
Adblockplus Chrome won't build, wrong jsshell downloaded for jshydra on 64 bit Linux machine
#2748
abp: links don't work with E10S enabled
#2776
Change text 'Adblocking' to 'Ad blocking' for the Adblock Browser (iOS) UI
#2778
Change text 'Adblocking' to 'Ad blocking' for the new options page
#2779
Create a landing page for Microsoft Edge
#2817
unauthorized addition of another filter extension
#2854
Two windows opening in Firefox when link from external app opened
#2923
[Adblock Browser for Android] "Firefox" mentioned for "Server not found" error
#2925
Support notification opt-out in libadblockplus
#2957
allow users to enforce ABP being loaded completely at Firefox startup, even if delaying it
#3001
FAQ settings item should lead to the Adblock Browser FAQ
#3089
Misplaced borders of share and donate section on first run page with smaller viewport sizes
#3137
[ABP for Chrome] "Add filter" dialog does not show up when 'Block element' is chosen.
#3146
Host Safari content blocker lists on easylist-downloads.adblockplus.org
#3159
Change order of elements in press and hold (context) menu
#3212
Management of pattern file for large scale deployment for Chrome is outdated
#3221
when browsing with ABP set to German the privacy policy is presented in english instead of German
#3287
Adblock Browser masquerade itself as Firefox on error pages
#3338
Update adblockplus reference in libadblockplus
#3389
Update the ABP Plugin used by Adblock Browser for Android
#3510
2 ABP options tabs are opened when adding a list from adblockplus.org/en/subscriptions
#3571
[Samsung Galaxy Tab3/ Android 4.4.2]"Frequently Asked Questions" in two lenguage
#3609
Notification is displayed even if Adblock filtering is disable.
#3619
Generate docs outside the devbuild build process
#3666
'Delete Bookmark' modal dialog disappears after selecting 'Delete Bookmark' in 'Edit Bookmark' .
#3711
Block Element frame is to small by default / scrolling is necessary.
#3723
Acceptable Ads are blocked on www.gutefrage.net and www.quoka.de in ABP iOS
#3733
Not able to clear history
#3845
Google Docs documents throw error messages with ABP enabled
#3863
New Logo on Eyeo.com
#3927
https://adblockplus.org/ 404 error
#4051
JsValue 'isNumber' method is not registered
#4058
Some CSS-filters broken in Firefox Nightly 48/49+
#4107
Document how to build libadblockplus for Android
#4118
Yandex (biggest search engine in russia) ads still not blocked
#4151
ABP icon looks squashed in Chrome 53 Canary
#4161
Set up a redirect for the Adblock Browser for Android FAQ
#4196
Adblock Plus no longer blocks ads on YouTube
#4214
Images on specific websites are not downloadable
#4228
Fix the most prominent crash reports from ABB 1.4.0
#4235
Better Anti-adblock switches options.
#4305
Popup isn't blocked if opened through local page with refresh in header.
#4307
spin.com, vibe.com ads still visible
#4315
YouTube videos get stuck at 0:00
#4369
abp-properties exception filter ignored in blockable items list
#4379
Add Crowdin Server Fixture and GET Info Method to CMS Tests
#4381
Add File Operations For Crowdin API Tests
#4417
ABP 2.7.3.4198 does not see the popups ?
#4418
blocking base64 popup urls
#4475
Chrome developer tools panel does not list -abp-properties matches
#4481
Footer menu isn't working in the blog (width < 1000 view)
#4507
Element Hiding Helper multiprocess support
#4529
Youtube video loading delay on Firefox
#4530
ABP slows down page load, even if it's disabled for the current domain
#4560
Ads are blocked on whitelisted sites
#4585
Change the logo in press materials to a new one
#4590
WebSocket wrapper breaking code that extends the WebSocket object
#4594
Website text for Edge needs to be updated
#4617
Set up Edge development builds on the server
#4626
Update development build creation for Edge
#4650
build.py script failing
#4660
Old logo used for eyeo.com favicon
#4664
Brightcove player crashes in Chrome with Adblock plus on jpost.com
#4671
Abp1.5 not work with IE11 under Win10 Insider Preview 1607
#4710
Default meta data
#4716
Update adblockpluscore and adblockplusui dependency to TBA
#4732
Why I deleted Adblockplus
#4748
Add support for dark page inspector theme in Google Chrome
#4801
Use modern JavaScript syntax throughout adblockplusui
#4809
ABP blocking AJAX POST submission on Open Source Script
#4816
Change the name of "Consumer Group" to "Digital Rights Organization" on the Acceptable Ads Committee Application form
#4819
Count in text about company nationalities does not match
#4840
"Block Element" tool fails to remove some grey overlay elements
#4897
Add a new job ad on eyeo.com/jobs
#4914
Returning from iTunes to web page states 'Back to Adblock'
#4918
Create card deck component for acceptableads.com
#4928
No longer call ElemHideEmulation.load
#4943
Settings menu does not appear in browser on certain devices.
#4990
[CMS] Add Pytest Coverage Report To Tox
#5016
Crash with no UpdateCheckDoneCallback passed
#5047
build libadblockplus-android error
#5054
build libadblockplus-android with error ndk
#5124
Update adblockpluscore dependency to 5086-webrtc
#5128
Mentioning Berlin office in 'Our offices' section

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
Don't hard code the admin email address everywhere

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

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

This is displayed as:

#78, #113, #187, #205, #207, #217, #218, #263, #278, #313, #319, #323, #329, #330, #334, #357, #377, #400, #405, #422, #423, #425, #426, #429, #436, #439, #441, #452, #474, #480, #482, #501, #504, #511, #551, #566, #583, #592, #607, #617, #619, #636, #659, #668, #679, #691, #694, #709, #717, #747, #759, #1088, #1124, #1126, #1135, #1139, #1150, #1153, #1159, #1219, #1223, #1253, #1255, #1261, #1272, #1276, #1278, #1291, #1293, #1323, #1332, #1333, #1336, #1340, #1341, #1343, #1346, #1348, #1350, #1367, #1373, #1394, #1395, #1422, #1432, #1443, #1482, #1536, #1572, #1615, #1627, #1636, #1638, #1718, #1726, #1728, #1741, #1746, #1749, #1752, #1792, #1845, #1858, #1881, #1886, #1915, #1923, #1930, #1931, #1936, #1939, #1991, #2013, #2025, #2026, #2028, #2030, #2091, #2107, #2124, #2149, #2153, #2207, #2210, #2226, #2314, #2316, #2321, #2350, #2363, #2391, #2411, #2529, #2570, #2573, #2601, #2608, #2616, #2641, #2657, #2670, #2680, #2716, #2743, #2745, #2748, #2776, #2778, #2779, #2817, #2854, #2923, #2925, #2957, #3001, #3089, #3137, #3146, #3159, #3212, #3221, #3287, #3338, #3389, #3510, #3571, #3609, #3619, #3666, #3711, #3723, #3733, #3845, #3863, #3927, #4051, #4058, #4107, #4118, #4151, #4161, #4196, #4214, #4228, #4235, #4305, #4307, #4315, #4369, #4379, #4381, #4417, #4418, #4475, #4481, #4507, #4529, #4530, #4560, #4585, #4590, #4594, #4617, #4626, #4650, #4660, #4664, #4671, #4710, #4716, #4732, #4748, #4801, #4809, #4816, #4819, #4840, #4897, #4914, #4918, #4928, #4943, #4990, #5016, #5047, #5054, #5124, #5128

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:

254

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#5275 fixed Minimize memory usage as soon as possible sergz sergz
#5264 fixed Adding a filter subscription on the options page does not work mjethani mjethani
#5257 fixed `npm test` should run the linter hfiguiere hfiguiere
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 4020)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#5275 fixed Minimize memory usage as soon as possible sergz sergz
Description

Background

Some users, in particular on android platforms, ask to minimize the memory usage as soon as it grows, in particular soon after the engine is instantiated.

The implementation of v8 can compact the memory used by it however it seems the only semi-official way to force it is to notify the engine about critically low memory. The memory growth soon after the engine instantiation is caused by such heavy operations as asynchronous loading of subscriptions into the memory and saving them to a storage, so ideally we need to call GC at the end of each of such operations, however it turned out that we call saving to disk often enough, at least after each such manipulation with subscription, so we can attempt to compact the memory simply after saving to a disk.

What to change

Add method to notify about low memory usage and call it when save even is received from core.

#5264 fixed Adding a filter subscription on the options page does not work mjethani mjethani
Description

Environment

Chrome 58 macOS Sierra 10.12 Adblock Plus 1.13.2 (changeset: 4363517a6b68) EasyList+AA

How to reproduce

  1. Open the options page
  2. Click on "Add filter subscription", select one from the dropdown, and click Add

Observed behaviour

Nothing happens.

Expected behaviour

It should add the filter subscription.

Notes

This is a regression introduced in changeset 2cebd252b232.

#5257 fixed `npm test` should run the linter hfiguiere hfiguiere
Description

Background

When the review says "eslint should have caught this" that means eslint didn't get run. The best way to ensure the developer does run eslint is it run eslint as part of the tests.

What to change

-Add eslint and the eyeo eslint config as a dependency in the package.json -Run eslint as part of npm test -Make sure the tests can run even if linter fails.

Bonus

It will also allow us to track the linter config version to the right one.

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 3 years ago Last modified on 03/07/2014 12:09:55 PM