wiki:TracQuery
Last modified 4 months ago Last modified on Jan 27, 2012 12:46:35 PM

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:

#62
Missing spawns - Hungry Corpse
#69
The new "cAtk" instead of "rCrit" in SA is not working
#77
Weapon SA - Focus defect
#140
Missing file
#227
Missing Spellbooks
#232
missin' food for baby pets
#270
ERROR 503_PursuitClanAmbition
#290
mob id 954 Hungry Corpse
#291
Mob Innersen (id=950)
#302
Wisdom of paagrio
#310
Wyvern manager in Aden is missing
#312
error in 503_PursuitClanAmbition
#327
merchant text missing
#337
Summon Cursed Man is a Active Skill, not a Passive Skill
#344
Unseal A grade Jewlery
#348
Pdef stats totally wrong.
#349
Pets Stats! (1945)
#358
What happens with stats ?
#379
Question for "skills"
#394
missed spawn for mob "Innersen"
#435
Summon Mechanic Golem Bug
#477
Summon Skill and Attack button missing.
#490
Nightly releases for DataPack are stopped in 2167 why ?
#550
Spellbook: Aura Bolt
#679
missing html
#705
bug`s
#714
missing html seven signs
#715
Q503
#725
Antharas Drops
#736
Adventurer skills.
#746
enchant skill trees error
#753
About Changeset [2588] and Grocery store in Gludin
#758
C5 chants
#784
Curse of Doom
#798
Missing "add SA" options for top C grade C5 weapons
#845
Reflect Damage skill
#851
missing html seven signs
#885
Reflect damage
#900
Quest error
#901
Vicious Stance damage effect seems too low
#908
Reflect Damage
#911
Pagan Temple: Door of Darkness doen't open.
#914
Register!
#921
Removing SA's Below A grade
#936
quest 350: error
#941
Repair 39_RedEyedInvaders
#945
Quest bug after new quest system
#976
Moonligst Sentinel quest of 3rd class transfer
#977
Buzz the cat
#981
Messenger of Goddard not Fix
#985
3 professions
#990
Focus Chance and Focus Power
#991
Reflect damage skills
#1000
Similar to #993
#1008
Skill FEAR bug
#1040
Bug with new blacksmith system
#1062
Elixir
#1092
Cannot start the Little wings quest
#1101
Quest #334 - The wishing potion, no quest drop on middle state
#1106
3rd class change
#1108
Elixir of Life problem
#1114
Respawn bug
#1141
373_SupplierOfReagents - Fails
#1161
Final frenzy & Final Fortress Skills?
#1166
503_PursuitClanAmbition
#1168
503_PursuitClanAmbition NameError
#1174
Final frenzy and Final Fortress does not activate in PVP or atack mobs
#1177
Final Frenzy and Final Fortress skills
#1185
1630_PaganTeleporters wrong check
#1187
Bug in Boat from rune to Gludin
#1197
Sin Eater
#1208
Pet
#1228
add missing 3rd class quests
#1245
Goddard castle mass gk
#1249
enchanted accuracy - wrong (about 3x) mp consume
#1267
missing html page
#1286
Gurad Stance. MP overspending
#1301
Guard Stance bugg
#1312
correction
#1317
missing html page data\html\teleporter\35355.htm
#1323
Clan skills don't work at all
#1330
Proof of clan alliance
#1335
Error in quest 501
#1340
Strange bug in boat from Primeval Isle to Rune (LOL)
#1359
Boat Rune >>>> Primeval not working
#1371
Missing text
#1395
Proof of clan alliance
#1437
missing html
#1467
data/html/symbolmaker/SymbolMaker.htm is missing.
#1473
missing html
#1507
NPC 35271 text missing
#1511
Mass Gatekeeper in Goddard Castle
#1520
501_ProofOfClanAlliance error
#1522
Lord crown - missed
#1570
zone 11037 missing
#1581
Zone vertex
#1584
Overlord skill SoulCry MP consumption
#1600
X
#1612
door.csv
#1613
skill error
#1642
mobs kamael island
#1669
419 Get a Pet
#1712
quest load error
#1754
Pride of Kamael
#1759
Missing Html Page
#1785
Wrong Skill Effect
#1795
Dynasty Sets - stats/conditions/etc.
#1801
missing text
#1830
Pet wolf quest is incorrect....
#1840
Missing rewards in 372_Legacy of Insolence
#1846
419_GetAPet bug
#1847
Could not insert item 268512657 ??
#1853
" Proof of alliance "
#1859
Dynasty Sets
#1860
Dynasty Sets
#1903
Path of Cleric
#1904
Majestic Light Set P.Attack bonus for Arbalesters
#1907
TypeError: showTutorialHTML():
#1914
255_Tutorial version 2321 CT1
#1920
Changeset 3113 (quests/255_Tutorial)
#1926
255_Tutorial/__init__.py - still "1st arg can't be coerced to String"
#1938
missing text
#1951
501_ProofOfClanAlliance Doesn't work correctly
#1965
Unable to enter dimensional rift
#1967
missing text
#1972
Quest 501 ProofOfClanAlliance
#1982
missing html
#1990
Clan Level 4 quest for Kamael Class
#2024
Dynasty set bad bonus
#2050
Kamael Armor Sets
#2067
Zaken entry
#2073
missing html page data/html/teleporter/35271.htm
#2083
[BUG] 226_TestOfHealer
#2093
648_AnIceMerchantsDream - in onTalk NameError: int
#2106
error - an ice merchants dream
#2109
Missing Dynasty stats
#2121
Enchant skills
#2145
html missing
#2176
html missing
#2177
Switch & Sand Bomb
#2190
Dynasty Bodypart
#2195
Imperial Staff - Magic Hold SA bad chance value
#2215
Missing HTML
#2220
NPC Missing
#2229
error on load skills
#2231
Missing Pet Data
#2235
problem Pet
#2247
Pet NPC ID 12312, level 86 is missing data from pets_stats table!
#2268
pet level error
#2291
SpawnTable: Data missing
#2292
html missing
#2308
SpawnTable: Data missing in NPC table for
#2331
Spirit of Sagitarius buff duration is wrong
#2332
Divine Inspiration (Manuscript) books are not stacking.
#2338
sagasuperclass - error
#2340
Add life crystals to GMShop
#2347
Drop Spellbook Summon Magnus the unicorn on a non-spawned mob
#2351
level 86 is missing data from pets_stats table
#2359
Trick, Bluff.
#2370
Saga superclass error..
#2375
Message game server console
#2379
npcs'
#2403
Mass Gatekeeper of schuttgart
#2404
"Event Skills" - Forgiveness - Happiness - Pardon
#2407
SpawnTable: Data missing in NPC table
#2408
Giran's clanhall door
#2430
icory tower zone
#2435
Python Error in 89_SagaOfTheMysticMuse
#2466
PeaceZone
#2468
Importand please Fix it - Player get Karma in TVT Event with new Zones.
#2487
Kamael Final Form And Nobless
#2493
Dont work skill
#2511
Missing html
#2516
SagasSuperclass Key Index Error
#2538
Red striders
#2541
Icarus disperser CD don't work
#2551
Problem with 69_SagaOfTheTrickster
#2598
mirage
#2601
SagaSuperclass again
#2608
Mirage Skill Doesn't Work
#2633
quest error
#2636
Common items armor and weapon adena=ok ? work common items?
#2637
No four_sepulchers_spawnlist.sql
#2639
Primeval island mobs alone?
#2643
common items no price
#2649
Dinosaurs alone!
#2674
PathToOrcMonk/__init__.py NameError: L2WeaponType
#2685
Boats are still buggy
#2701
Pendant Bug
#2703
Hierofant 79 skills not done.
#2713
SagasSuperclass error
#2758
268_TracesOfEvil - Missing HTML - 30599-01.htm
#2764
98_SagaOfTheShillienSaint line 247, in onAdvEvent
#2821
slow / anchor > heroic miracle
#2823
file missing
#2836
augmentations table
#2859
Castle crown
#2889
Error in custom_droplist
#2891
Door Error
#2894
counteratack not working
#2904
Skills of the summons
#2918
Newbie XML NPE
#2926
Core,Ant Queen Spawn loc !
#2960
Baium!!!
#2967
337_AudienceWithTheLandDragon
#2974
Alliance of splendor no respawn!
#2975
Fishing inside giran town
#2978
PolymorphingOnAttack and Fang of Splendor problem
#2981
PolymorphOnAttack Bug
#2987
Missing NPC 32008 Gremory from quest 639_GuardiansOfTheHolyGrail
#3013
Augment is fake.
#3014
Augment is fake.
#3025
no spawn
#3036
Update files for [5608] is wrong !
#3039
501_ProofOfClanAlliance - Statue "You don't have the quest bla bla"
#3103
Break Duress Skill Bugged - 2 times spawn Fortress of Resistance Raid Boss
#3104
Shillien Templar - Vanguard Bug
#3111
core spawn problema...
#3144
Foundation Items
#3174
Problem with [5789]
#3186
Zaken AI error
#3194
Improve Combat
#3205
I have one error
#3220
NPE
#3221
AutoAnnounce error
#3222
AdminAnnouncements.java error
#3230
pets_stats sql error
#3269
Changeset 6030
#3271
Vesper weapon
#3274
Vesper SA Weapons
#3280
quest "Seed of Infinity"
#3290
error
#3309
I can't find way to fight with Beleth. What is the quest ID for Beleth Raid Boss?
#3329
Health SA in Vesper Weapons
#3338
Prophecy of Fire max HP -> MP
#3340
SA Vesper Weapons
#3349
Potions.java
#3350
skillench
#3356
NPE in mc_show
#3373
NPE in McShow
#3378
Item skill : Aura Flare
#3384
Grade Penalty
#3389
FairyTrees.java
#3413
Problem with MCShow
#3429
Vesper SA's
#3434
InstantJump.java - java.util.Random not found, net.sf.l2j.Rnd never used
#3462
Kamael SkillEnchant
#3463
Kamael SkillEnchant
#3466
console big error
#3475
SA Not work
#3478
TARGET_CLAN
#3507
Dominator Buff stack mistake
#3531
Critical Damage SA
#3533
SA: Rsk. Haste
#3535
clan bug
#3537
Overlord\dominator
#3541
Vesper SA don't works
#3543
S84 Grade Vesper Working Special Abilities (SA) file
#3549
cloak is not used by any race
#3554
Castle
#3561
SA in the Weapons S 84 do not work!
#3562
SA in the Weapons S-84 and in all Dual swords do not work!
#3570
master work items do not give bonuses
#3575
Gate chant bug (possible)
#3580
SA in the Weapons S 84 and all Dual Swords do not work!
#3587
Error in "count" : Table = Items
#3588
pet exp after evolve
#3617
Tawny-Maned Lion Mounting Bracelet 7 day relay?
#3623
Quests 103, 104 and 106 rewards
#3628
Please, see again ticket 3623
#3632
Quest 103_SpiritofCraftsman reward wrong
#3633
Quest 103_SpiritofCraftsman reward wrong
#3634
Force Meditation
#3639
Aden Wall Left ZMax
#3678
Adventurer's Wind Walk Error
#3707
Paladin Skills
#3757
NPE L2AttackableAIScript.java
#3760
Minor defect on skill 3601
#3826
Level Hellbound instance not work
#3833
I have this error on my server
#3852
auto spirit shot fix pls
#3853
reflect skill
#3862
Problem with quest
#3863
crit rate different
#3867
Some Skills Bugs
#3868
Shillien Elder
#3869
Sprint Enchant doesn't add evation points.
#3876
Agression Skill
#3878
503_PursuitClanAmbition
#3880
Raging Waves (sps) / Vulcano (sorcer) - Hits ALL!
#3881
Clan Quest lv5
#3882
Clan LVL 5
#3906
NPC Cancel and Mass Cancel
#3907
quest for clan level 5 issue
#3911
gm skill
#3912
item skill
#3914
Quest Not Done :(
#3924
GM Speed 4 Is not working
#3936
Palladin - Sacrifica can be used himself
#3952
RaidBoss bugs!
#3958
LINK bypass
#3963
Focus Attack Error
#4009
http://www.l2jdp.com/trac/ticket/4001
#4010
http://www.l2jdp.com/trac/ticket/4004
#4026
NPE@L2AttackableAI.thinkAttack() Line 1128
#4046
Quest "Path to become a Lord"
#4094
RB Cancel
#4108
Boost Morale & Flame Icon be stack
#4128
Imperial Tomb bug
#4134
311 Expulsion of Evil Spirits
#4147
Frintezza.java
#4151
Enchant skill problem ? or skill ? .
#4199
NPE@L2AttackableAI.thinkAttack() Line 1024
#4346
NPE@L2AttackableAI.thinkAttack() Line 1024
#4658
kwpd
#4694
mystic immunity
#4716
kamael and thank
#4717
kamael and thank
#4725
NPE
#4730
chance skill
#4764
Test Of the lord
#4773
typo in 01200-01299.xml
#4786
Chat (All)
#4800
999_T1Tutorial - Error
#4811
Sonic Mastery/Force Mastery skills
#4821
Disarm enchant
#4852
Olympiad Arenas Problem
#4854
Set heavy , robe and certific skill
#4861
Summons Problem
#4866
Bug NPC
#4867
Bug NPC
#4872
Servitor share bug
#4878
Fe3rdi
#4888
Hammer crush- armor crush - rush impact

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
327 ReclaimTheLand - quest items

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

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

This is displayed as:

#62, #69, #77, #140, #227, #232, #270, #290, #291, #302, #310, #312, #327, #337, #344, #348, #349, #358, #379, #394, #435, #477, #490, #550, #679, #705, #714, #715, #725, #736, #746, #753, #758, #784, #798, #845, #851, #885, #900, #901, #908, #911, #914, #921, #936, #941, #945, #976, #977, #981, #985, #990, #991, #1000, #1008, #1040, #1062, #1092, #1101, #1106, #1108, #1114, #1141, #1161, #1166, #1168, #1174, #1177, #1185, #1187, #1197, #1208, #1228, #1245, #1249, #1267, #1286, #1301, #1312, #1317, #1323, #1330, #1335, #1340, #1359, #1371, #1395, #1437, #1467, #1473, #1507, #1511, #1520, #1522, #1570, #1581, #1584, #1600, #1612, #1613, #1642, #1669, #1712, #1754, #1759, #1785, #1795, #1801, #1830, #1840, #1846, #1847, #1853, #1859, #1860, #1903, #1904, #1907, #1914, #1920, #1926, #1938, #1951, #1965, #1967, #1972, #1982, #1990, #2024, #2050, #2067, #2073, #2083, #2093, #2106, #2109, #2121, #2145, #2176, #2177, #2190, #2195, #2215, #2220, #2229, #2231, #2235, #2247, #2268, #2291, #2292, #2308, #2331, #2332, #2338, #2340, #2347, #2351, #2359, #2370, #2375, #2379, #2403, #2404, #2407, #2408, #2430, #2435, #2466, #2468, #2487, #2493, #2511, #2516, #2538, #2541, #2551, #2598, #2601, #2608, #2633, #2636, #2637, #2639, #2643, #2649, #2674, #2685, #2701, #2703, #2713, #2758, #2764, #2821, #2823, #2836, #2859, #2889, #2891, #2894, #2904, #2918, #2926, #2960, #2967, #2974, #2975, #2978, #2981, #2987, #3013, #3014, #3025, #3036, #3039, #3103, #3104, #3111, #3144, #3174, #3186, #3194, #3205, #3220, #3221, #3222, #3230, #3269, #3271, #3274, #3280, #3290, #3309, #3329, #3338, #3340, #3349, #3350, #3356, #3373, #3378, #3384, #3389, #3413, #3429, #3434, #3462, #3463, #3466, #3475, #3478, #3507, #3531, #3533, #3535, #3537, #3541, #3543, #3549, #3554, #3561, #3562, #3570, #3575, #3580, #3587, #3588, #3617, #3623, #3628, #3632, #3633, #3634, #3639, #3678, #3707, #3757, #3760, #3826, #3833, #3852, #3853, #3862, #3863, #3867, #3868, #3869, #3876, #3878, #3880, #3881, #3882, #3906, #3907, #3911, #3912, #3914, #3924, #3936, #3952, #3958, #3963, #4009, #4010, #4026, #4046, #4094, #4108, #4128, #4134, #4147, #4151, #4199, #4346, #4658, #4694, #4716, #4717, #4725, #4730, #4764, #4773, #4786, #4800, #4811, #4821, #4852, #4854, #4861, #4866, #4867, #4872, #4878, #4888

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:

334

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#5302 invalid spam LION anonymous
#5301 invalid spam kadar anonymous
#5300 invalid spam warrax anonymous
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 5198)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#5302 invalid spam LION anonymous

Reported by anonymous, 24 hours ago.

Description

email addresses your webtv What does email addresses webtv really mean to you? You should direct all of your efforts towards that. Some of us actually need guestbook and it makes it sound that awesome to you. This is a tantalizing offer. Each year the number of people who enjoy forum continues to rise as soon as that is a personal decision that people have to make for themselves. That's exactly what they need. If you haven't up to now seen it or heard of it, I'll try to give you a general conclusion of what facebook is all relevant to. Supposedly, today things are different. It is established how neophytes mustn't demonstrate an uninvolved thing like blog. Nine in ten trainees said they take under advisement the concept that forum more essential than ever. email addresses webtv is something which requires even more research.

#5301 invalid spam kadar anonymous

Reported by anonymous, 5 days ago.

Description

palmbeachac I would like to show thanks to you just for bailing me out of this type of issue. Because of exploring throughout the internet and coming across advice which were not beneficial, I assumed my life was gone. Being alive devoid of the solutions to the issues you've solved all through your short post is a serious case, and the ones which may have adversely damaged my career if I had not noticed your web blog. The expertise and kindness in maneuvering almost everything was useful. I don't know what I would have done if I had not come upon such a solution like this. I can also at this time look forward to my future. Thank you very much for this professional and sensible guide. I will not be reluctant to endorse your web site to anyone who needs guidelines about this subject.

#5300 invalid spam warrax anonymous

Reported by anonymous, 3 weeks ago.

Description

Yeah, yeah or herearticle about how to obtain info on becoming the envy of your golf foursome. Good information[http://yourbestgolftonight.com/greenside-sandtrap-tips.php golf sand trap tips]

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