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:

#16
Create proper website
#17
Add mouse support
#22
Turn next_xp option on permanently
#37
Split up externs.h into other headers, to allow less recompiling
#74
Add reference counting to the quarks package
#75
Panic saves shouldn't overwrite normal savefiles
#109
Remove unused ports
#110
Slim down number of ports further
#113
Build/Package win console mode angband along with windows binaries
#178
Lanterns of everburning should not be fuellable or useable as fuel
#237
Windows Angband reacts to clicks while in the background
#267
message displays wrong total count after purchasing items that you already have
#306
run isn't working
#439
Armour with negative to-hit gets classed as "magical"
#493
Windows port doesn't save when computer shut down
#523
Import FA's get_item() and get_spell() menu-ified functions
#530
Allow reviewing the contents of the home from the knowledge screens.
#577
Debug mode isn't friendly in the slightest
#582
Traps are boring
#606
Macro's still use normal keyset when game is set for roguelike keys
#632
Detect Enchantment should be more consistent
#650
Infinite Scroll of Rune of Protection
#660
Allow New Game/Load Game without Quitting
#785
Various mushrooms have 0 value and squelch by default
#815
Lose turn when unable to attack
#846
Numbers in item description neglect item's own pval
#863
Allow home inventory to be accessible from knowledge menu
#881
Inpsect needs a more prompt
#911
Monster list needs a go-through
#967
Some artifacts not placed into history when found/ID'd
#971
inconsitency in monster info and rod information
#977
Garbage in message recall window when dropping items in home
#1035
Display relative speed
#1044
"this can never happen!" happens whenever a rod recharges.
#1080
Add min/max depths for ego types
#1108
Add no_selling option
#1126
Enchant scrolls do not remember the selected item when repeating with 'n'
#1147
don't reduce energy on load
#1164
Improve the item list
#1200
Trap suggestions
#1271
Fix or remove variance in gold drops
#1272
Need -lSDL on new(ish) Linux
#1284
Move to C99 types
#1289
Remove cheat options, move them to wizard mode
#1294
Version 3.2 crashes immediately upon startup (Intel Mac, OS X 10.5.8)
#1295
Allow access to birth options at the final stage of character creation
#1323
Monsters should have unique names
#1344
cannot handle window more than 256 chars wide
#1372
gruesome bug leaps and then segfault at C-x; reproducible
#1374
Loading window preferences doesn't work
#1400
Restore Item "mends" =Mouse, =Dog
#1405
Mutiple Pval oddness
#1416
Staff of Detect Invisible not showing invisible monster
#1418
Pressing return while using roguelike keys tunnels downward.
#1420
Detect Invisible does not always detect invisible monsters
#1423
Accents do not always display properly
#1426
Crash when down arrow is pressed
#1496
Improve running
#1532
Update spoilers
#1578
Ensure that effect values are >0 in project_m
#1649
mon_inc_timed: Assertion `timer > 0' failed.
#1685
Improper capitalization in some messages.
#1724
SDL port crash on exit with stack trashing
#1730
Crash in SDL port upon exit
#1762
Graphics gone all squiffy
#1769
Potion mimics shatter twice when destroyed
#1807
Squelched Items appear in message line on walkover
#1808
Monster recall subterm does not refresh on level change
#1825
Turn count bug (player history)
#1826
GCU port wall display is behaving strangely.

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:

No results

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

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

This is displayed as:

#16, #17, #22, #37, #74, #75, #109, #110, #113, #178, #237, #267, #306, #439, #493, #523, #530, #577, #582, #606, #632, #650, #660, #785, #815, #846, #863, #881, #911, #967, #971, #977, #1035, #1044, #1080, #1108, #1126, #1147, #1164, #1200, #1271, #1272, #1284, #1289, #1294, #1295, #1323, #1344, #1372, #1374, #1400, #1405, #1416, #1418, #1420, #1423, #1426, #1496, #1532, #1578, #1649, #1685, #1724, #1730, #1762, #1769, #1807, #1808, #1825, #1826

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:

70

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#1826 duplicate GCU port wall display is behaving strangely. myshkin
#1825 duplicate Turn count bug (player history) PowerWyrm
#1818 fixed (in master) Examining fails after a lack of item to identify nckmccnnll
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 1494)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#1826 duplicate GCU port wall display is behaving strangely. myshkin
Description

Reported in IRC by shadowsun. I don't understand the full scope of the problem, but there's some intersection of main-gcu, the -a option, font-gcu.prf, and perhaps terminal type. Conversation included below.

(08:03:35 PM) shadowsun: So, I'm playing angband on cli/console, no gui, on linux. I've tried regular font - angband won't place nice, demands a utf-8 console. So, I've converted the entire system console over to utf-8; I've tried with standard fonts, I've tried with terminus, etc, and for the life of me I cannot figure out why all the walls are invisible. Help?
(08:11:14 PM) myshkin: Hmm. What version?
(08:13:53 PM) myshkin: (Of Angband, that is.)
(08:16:54 PM) shadowsun: sorry, 3.5.0
(08:18:57 PM) myshkin: And you can see yourself and monsters, but not walls and doors?
(08:21:46 PM) shadowsun: I can see doors just fine
(08:21:46 PM) shadowsun: And I can see walls if they're lit by some light source
(08:21:46 PM) shadowsun: but instead of dim unlit walls, there's blackness and dim unlit floors, and it just looks weird.
(08:22:21 PM) myshkin: What's your TERM variable?
(08:22:24 PM) shadowsun: linxu
(08:22:26 PM) shadowsun: erm
(08:22:26 PM) shadowsun: linux
(08:22:47 PM) shadowsun: I'm at linux console, so the term is the vt from the kernel
(08:22:56 PM) shadowsun: i.e. there is no GUI here
(08:23:04 PM) ***myshkin nods
(08:24:08 PM) myshkin: There are some existing reports that may be related, but I'm not sure. Does toggling any of the UI options do anything?
(08:24:19 PM) shadowsun: No, I can't seem to change things about the walls
(08:24:30 PM) shadowsun: Like, no matter what I do, I don't get # and %
(08:24:35 PM) myshkin: (I assume solid_walls and hybrid_walls are the only ones likely to do anything.)
(08:24:42 PM) shadowsun: (Yeah, they seem to do nothing.)
(08:26:32 PM) myshkin: How about turning on ascii walls? e.g. .../angband -- -a? (You can also increase the number of subterms as a command-line option, if you weren't aware.)
(08:31:47 PM) shadowsun: uh
(08:31:54 PM) shadowsun: That's what I thought turning off solid walls would do
(08:33:23 PM) shadowsun: okay, that gives me back my # walls
(08:33:28 PM) shadowsun: But if they're unlit, they're not visible.
(08:33:40 PM) shadowsun: Is this new code trying to change the color of the terminal colors?
(08:33:49 PM) myshkin: Hm, that's a good point. It's been a while since I used the gcu port.
(08:34:15 PM) shadowsun: Yeah, I seem to run into "Everyone uses a GUI now" a lot lately
(08:34:29 PM) shadowsun: I'm quite happy being a fossil from time to time ;)
(08:34:41 PM) myshkin: Nothing wrong with that. :)
(08:34:46 PM) shadowsun: Zactly!
(08:35:01 PM) shadowsun: Also, using a raspberry pi as a desktop is saving me so much money on electricity it's absurd
(08:35:21 PM) myshkin: So, just for kicks, what happens if you change your TERM to xterm-256color?
(08:35:26 PM) shadowsun: good question
(08:36:50 PM) shadowsun: That's .... weird.
(08:36:51 PM) shadowsun: If it's lit, I can see it. If it's a door, I can see it if it's unlit
(08:36:51 PM) shadowsun: everything else is black.
(08:37:13 PM) myshkin: Okay, that's not good. I assume xterm is not any better, then.
(08:37:14 PM) shadowsun: Probably because there's only 16 colors in console, still
(08:38:44 PM) elly: I play only gcu, by the way
(08:38:58 PM) shadowsun: elly: How do you get unlit walls to show?
(08:39:05 PM) elly: sec
(08:42:29 PM) elly: http://i.imgur.com/us0srI7.png
(08:42:29 PM) shadowsun left the room (quit: Read error: Connection reset by peer).
(08:42:29 PM) elly: my walls look like that
(08:42:29 PM) elly: with no tweaking
(08:42:29 PM) elly: http://i.imgur.com/y8fczu4.png with -mgcu -- -a
(08:42:29 PM) elly: my TERM is xterm
(08:43:06 PM) shadowsun [1000@slackertype.org] entered the room.
(08:43:09 PM) elly: heyo
(08:43:18 PM) shadowsun: Okay, had that irssi on the wrong box, sorry about that >.>
(08:43:36 PM) myshkin: elly: shouldn't -a imply # walls?
(08:43:41 PM) elly: myshkin: it does
(08:43:51 PM) elly: those are # walls, bolded
(08:43:53 PM) myshkin: Oh, sorry, looking at wrong graphics.
(08:43:58 PM) elly: yeah
(08:44:06 PM) shadowsun: it does, mostly
(08:44:06 PM) elly: anyway, that's with restruct master
(08:44:11 PM) elly: I can try 3.5.0
(08:44:24 PM) shadowsun: If you want me to try another version of angband, I can tomorrow
(08:44:51 PM) elly: you're using xterm, right?
(08:44:58 PM) shadowsun: elly: How would I use xterm?
(08:45:07 PM) shadowsun: I'm at console. There is no gui in which to run xterm. :)
(08:45:17 PM) myshkin: TERM=linux by default, but I had shadowsun try TERM=xterm and TERM=xterm-256color.
(08:45:17 PM) elly: oh, you're using an actual tty? okay
(08:45:21 PM) shadowsun: yeah
(08:45:25 PM) elly: no wonder TERM=linux
(08:45:28 PM) shadowsun: :)
(08:45:29 PM) elly: sec
(08:45:32 PM) shadowsun: <-- fossil lol
(08:47:15 PM) elly: walls look proper on tty2 for me with and without -a
(08:47:15 PM) elly: there TERM=linux
(08:47:15 PM) elly: what's your console font?
(08:47:25 PM) shadowsun: Right now it's default unicode kernel font
(08:48:47 PM) shadowsun: vt.default_utf8=1 to kernel cmdline
(08:48:48 PM) elly: hm
(08:48:48 PM) elly: did it not work without that cmdline option either?
(08:48:48 PM) shadowsun: It won't start without that
(08:48:48 PM) shadowsun: angband requires utf-8 to run now, apparently
(08:48:50 PM) shadowsun: Without it, it just tells me it requires utf-8 and quits
(08:50:17 PM) elly: O_o
(08:50:17 PM) shadowsun: unicode_start likes LatArCyrHeb-16
(08:51:47 PM) shadowsun: Which exhibits the same symptoms exactly as terminus' ter-114n.psf does.
(08:51:47 PM) shadowsun: and behaves exactly the same as the kernel default console font.
(08:51:47 PM) elly: yeah, I dunno
(08:51:47 PM) shadowsun: Of course, you apparenlty have to angband -- -a to actually pass it -a
(08:51:47 PM) elly: it works for me here
(08:51:47 PM) shadowsun: so I never tried that without utf-8.
(08:51:48 PM) shadowsun: Are you at tty?
(08:51:54 PM) elly: yes
(08:51:59 PM) shadowsun: Hrm
(08:52:00 PM) elly: in this case vt2
(08:52:06 PM) shadowsun: yeah, vt6 here
(08:52:09 PM) shadowsun: sec
(08:52:39 PM) shadowsun: what's your $LANG set to?
(08:53:02 PM) elly: en_US.UTF-8
(08:53:34 PM) shadowsun: Okay
(08:53:40 PM) shadowsun: and in angband, if you go = and edit colors
(08:53:45 PM) shadowsun: How many visible colors do you have?
(08:54:26 PM) elly: 28 it seems
(08:54:42 PM) shadowsun: I have 1-28
(08:54:46 PM) shadowsun: 0 is apparently black
(08:55:02 PM) shadowsun: Are the unlit #'s being set to black, and if so how would I change them to dark grey?
(08:55:12 PM) shadowsun: in other words, how would I change their color?
(08:55:13 PM) elly: oh, yes, I have 1-28 as well
(08:55:15 PM) elly: and no 0
(08:55:33 PM) shadowsun: -.-
(08:56:02 PM) elly: puzzling
(08:56:10 PM) myshkin: Try ~, and then e (Display feature knowledge).
(08:56:16 PM) myshkin: v will let you edit colors.
(08:56:21 PM) myshkin: You should not have to do this, though.
(08:57:06 PM) myshkin: Oddly, while sshed into a terminal, I am getting solid walls no matter what I do.
(08:57:07 PM) shadowsun: I GOT IT
(08:57:09 PM) shadowsun: It's in font-gcu.prf
(08:57:16 PM) elly: ?
(08:59:15 PM) elly: you shouldn't need to edit font-gcu.prf
(08:59:15 PM) shadowsun: If I comment out granite walls, I can see them again
(08:59:15 PM) elly: I didn't...
(08:59:15 PM) shadowsun: which makes no sense, unless that entry is somehow wrong for ARM platforms.
(08:59:15 PM) shadowsun: Or something.
(08:59:15 PM) shadowsun: I'd have to dig at the source to figure out more
(08:59:15 PM) shadowsun: because I'm not even quite sure what the fields are, but apparently it's doing something vt100-ish for some character I don't have.
(08:59:15 PM) shadowsun: and yeah
(08:59:24 PM) shadowsun: How do I get a look cursor that moves freely?
(08:59:41 PM) elly: so like
(08:59:48 PM) elly: in this entry: F:56:all:0x81:0x20
(09:00:01 PM) elly: the last two are attribute and character for drawing the granite wall
(09:00:14 PM) d_m: so i will say that main-gcu does something semi-hacky for solid walls
(09:00:16 PM) elly: so font-gcu.prf will try to use spaces with attr 0x81
(09:00:33 PM) d_m: using a special reverse-video bit in the color
(09:00:45 PM) shadowsun: ...
(09:00:51 PM) shadowsun: that would explain why there's nothing there.
(09:00:52 PM) d_m: pretty sure 0x81 means "reverse video 0x01"
(09:01:07 PM) d_m: so it should be drawing a space, but with A_REVERSE set
(09:01:13 PM) shadowsun: okay
(09:01:25 PM) d_m: so instead of white text on (default/black) background
(09:01:31 PM) d_m: it should be (default/black) text on white background
(09:01:35 PM) d_m: but it's possible that isn't working on your system
(09:01:54 PM) shadowsun: How would I change 81 to be dark grey?
(09:02:09 PM) d_m: what color is dark grey normally?
(09:02:19 PM) ***d_m doesn't have all the colors memorized
(09:02:20 PM) shadowsun: 08?
(09:02:20 PM) myshkin: You should be able to do that in the feature editor I mentioned. There's a color picker.
(09:02:24 PM) d_m: try 0x88 then
(09:02:29 PM) shadowsun: myshkin: I can't pick what is what color tho
(09:02:41 PM) myshkin: Even after you press v?
(09:02:44 PM) d_m: the top bit (0x80) reverses the video, and the reset of the bits determine color
(09:02:58 PM) d_m: *rest of the bits
(09:03:19 PM) elly: on _my_ system, 0x200 is A_REVERSE, not 0x80 :P
(09:03:20 PM) shadowsun: myshkin: It's a vty. It's not like the colors themselves can be changed.
(09:03:35 PM) d_m: elly: i'm not talking about ncurses constants
(09:03:40 PM) d_m: i'm talking about angband colors
(09:03:47 PM) elly: d_m: haha you weren't kidding about the hack in main-gcu though
(09:04:30 PM) myshkin: shadowsun: Oh, so you don't have dark grey as one of the colors there? I'm confused.
(09:04:39 PM) d_m: so yeah, angband is limited to 128 colors (0x00 through 0x7f) since the highest bit is used for signaling the colors be reversed
(09:04:46 PM) shadowsun: myshkin: I do, it's color 8 in the editor, but I can't assign things to be that color
(09:04:49 PM) d_m: this is because angband doesn't have a concept of fg/bg colors
(09:05:08 PM) shadowsun: myshkin: Like I can't say "All granite walls be d. grey"
(09:05:27 PM) shadowsun: d_m: With 0x88 I get nothing, but with 0x84 I get red walls.
(09:05:38 PM) d_m: so 0x08 must be the wrong color then.
(09:05:41 PM) d_m: you can experiment with others
(09:06:05 PM) d_m: e.g. instead of 0x14 you would do 0x94 and so on
(09:06:11 PM) shadowsun: OH.
(09:06:12 PM) elly: * Someone should really check the semantics of "initscr()" O_o
(09:06:51 PM) shadowsun: Okay
(09:07:03 PM) shadowsun: d_m: the character set for granite walls, bieng a space, overrides my # walls
(09:07:29 PM) elly: pass -a
(09:07:44 PM) elly: -a undoes the pref file hack
(09:07:46 PM) shadowsun: elly: I am.
(09:07:53 PM) elly: and it still uses them? wat
(09:08:11 PM) shadowsun: elly: wait. Let me try something
(09:08:24 PM) d_m: angband -mgcu -- -a should work
(09:08:29 PM) shadowsun: yes, it still uses them
(09:08:36 PM) shadowsun: My room walls are #'s
(09:08:43 PM) shadowsun: and lit walls are #
(09:08:43 PM) elly: good
(09:08:45 PM) d_m: yeah it's weirder than that
(09:08:51 PM) d_m: looks like someone broke -a at some point
(09:08:52 PM) shadowsun: but unlit walls are using the entry from the pref file.
(09:08:54 PM) d_m: that definitely used to work
(09:09:12 PM) ***d_m needs to go back over this file with some vigor
(09:09:14 PM) shadowsun: Also, 0x88 is useless on ARM
(09:09:20 PM) shadowsun: well, clarification
(09:09:29 PM) shadowsun: It appears to be useless on Raspberry PI console
(09:09:35 PM) elly: oh no
(09:09:41 PM) shadowsun: since I just get black. 0x89 gives me a light grey.
(09:09:56 PM) d_m: shadowsun: it's possible that 0x80 is the "black" color
(09:10:01 PM) elly: d_m: -a only handles FEAT_WALL_EXTRA and FEAT_PERM_EXTRA
(09:10:02 PM) d_m: err, i mean 0x08
(09:10:07 PM) shadowsun: d_m: mmmm
(09:10:10 PM) shadowsun: lets try
(09:10:17 PM) elly: (as does the font-gcu.prf file)
(09:10:29 PM) d_m: elly: right. so, i know that stuff got changed around after -a was introduced
(09:10:31 PM) elly: so random bits of wall might be missing
(09:10:33 PM) d_m: right.
(09:10:35 PM) elly: and most pertinently
(09:10:37 PM) d_m: i think you're correct about that.
(09:10:40 PM) elly: secret doors will show up as invisible
(09:10:43 PM) elly: instead of wall :P
(09:10:45 PM) shadowsun: yeah, 0x08 is also apparently black
(09:10:52 PM) myshkin: This seems like something that needs to get fixed for 3.5.1. Anyone up for filing a bug?
(09:11:06 PM) elly: I'm surprised I do not experience the secret-door behavior
(09:11:10 PM) shadowsun: myshkin: I have no gui
(09:11:12 PM) d_m: myshkin: i need to wake up in 5:45 to takea  train to NYC, so... i'd rather not right now.
(09:11:18 PM) shadowsun: I can file a bug tomorrow
(09:11:20 PM) d_m: myshkin: but i can probably fix it sometime later if someone else does.
(09:11:20 PM) elly: using gcu in xterm even
(09:11:28 PM) d_m: yeah, it is all fucked up right now.
(09:11:31 PM) shadowsun: I need to be up early so I'm crashing now
(09:11:31 PM) d_m: and should be easy to fix.
(09:11:34 PM) shadowsun: yeah
(09:11:35 PM) myshkin: Fair enough. shadowsun, I wouldn't worry too much about it. One of us will get on it.
(09:11:40 PM) shadowsun: I'll just comment out the entire gcu prefs file
(09:11:43 PM) shadowsun: for now
(09:12:20 PM) myshkin: I'll create a bug and paste the IRC conversation in. I'm not sure I understand everything, though.
(09:12:25 PM) shadowsun: yes awesome
(09:12:25 PM) shadowsun: That makes it look exactly like I wanted.
#1825 duplicate Turn count bug (player history) PowerWyrm
Description

See ​http://angband.oook.cz/forum/showthread.php?p=92560 for symptom and proposed fix.

#1818 fixed (in master) Examining fails after a lack of item to identify nckmccnnll
Description

If you try to use identify and get the "You have nothing to identify" message, immediate use of the inspect command gives the "You have nothing to examine" message.

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 14 months ago Last modified on 09/11/13 03:23:08