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:

No results

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
IZ730: File open dialog should remeber last directory

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

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

This is displayed as:

No results

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:

0

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

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#2469 invalid Bitcoin £13,709.52 uzvuffk@…
#2468 invalid Bitcoin £13,709.52 inpotyn@…
#2467 Undeliverable: Re: [SGE] #1719: Re: New Purchase Order-030220- SMART SOURCING INC. postmaster@…
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 1181)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#2469 invalid Bitcoin £13,709.52 uzvuffk@…
Description

Best friends buy &#163;300,000 plane for a once-in-a-life time trip around the world. You won’t believe how they paid for it!

Best Friends Andy Coulgrass and Dominik Fincher have achieved their dreams of buying a plane to fly themselves around the world and it was easier than you might think.

Click Here to see the platform in

action

Added by email2trac

#2468 invalid Bitcoin £13,709.52 inpotyn@…
Description

Best friends buy &#163;300,000 plane for a once-in-a-life time trip around the world. You won’t believe how they paid for it!

Best Friends Andy Coulgrass and Dominik Fincher have achieved their dreams of buying a plane to fly themselves around the world and it was easier than you might think.

Click Here to see the platform in

action

Added by email2trac

#2467 Undeliverable: Re: [SGE] #1719: Re: New Purchase Order-030220- SMART SOURCING INC. postmaster@…
Description

https://products.office.com/en-us/CMSImages/Office365Logo_Orange.png?version=b8d100a9-0a8b-8e6a-88e1-ef488fee0470 Your message to info@… couldn't be delivered. info wasn't found at smart-sourcing.com. sge-bugs Office 365 info Action Required Recipient Unknown To address

How to Fix It The address may be misspelled or may not exist. Try one or more of the following:

  • Send the message again following these steps: In Outlook, open this non-delivery report (NDR) and choose Send Again from the Report ribbon. In Outlook on the web, select this NDR, then select the link "To send this message again, click here." Then delete and retype the entire recipient address. If prompted with an Auto-Complete List suggestion don't select it. After typing the complete address, click Send.
  • Contact the recipient (by phone, for example) to check that the address exists and is correct.
  • The recipient may have set up email forwarding to an incorrect address. Ask them to check that any forwarding they've set up is working correctly.
  • Clear the recipient Auto-Complete List in Outlook or Outlook on the web by following the steps in this article: Fix email delivery issues for error code 5.1.10 in Office 365<https://go.microsoft.com/fwlink/?LinkId=532972>, and then send the message again. Retype the entire recipient address before selecting Send.

If the problem continues, forward this message to your email admin. If you're an email admin, refer to the More Info for Email Admins section below.

Was this helpful? Send feedback to Microsoft<https://go.microsoft.com/fwlink/?LinkId=525921>.

More Info for Email Admins Status code: 550 5.1.10

This error occurs because the sender sent a message to an email address hosted by Office 365 but the address is incorrect or doesn't exist at the destination domain. The error is reported by the recipient domain's email server, but most often it must be fixed by the person who sent the message. If the steps in the How to Fix It section above don't fix the problem, and you're the email admin for the recipient, try one or more of the following:

The email address exists and is correct - Confirm that the recipient address exists, is correct, and is accepting messages.

Synchronize your directories - If you have a hybrid environment and are using directory synchronization make sure the recipient's email address is synced correctly in both Office 365 and in your on-premises directory.

Errant forwarding rule - Check for forwarding rules that aren't behaving as expected. Forwarding can be set up by an admin via mail flow rules or mailbox forwarding address settings, or by the recipient via the Inbox Rules feature.

Recipient has a valid license - Make sure the recipient has an Office 365 license assigned to them. The recipient's email admin can use the Office 365 admin center to assign a license (Users > Active Users > select the recipient > Assigned License > Edit).

Mail flow settings and MX records are not correct - Misconfigured mail flow or MX record settings can cause this error. Check your Office 365 mail flow settings to make sure your domain and any mail flow connectors are set up correctly. Also, work with your domain registrar to make sure the MX records for your domain are configured correctly.

For more information and additional tips to fix this issue, see Fix email delivery issues for error code 5.1.10 in Office 365<https://go.microsoft.com/fwlink/?LinkId=532972>.

Original Message Details Created Date: 12/6/2020 7:52:25 PM Sender Address: sge-bugs@… Recipient Address: info@… Subject: Re: [SGE] #1719: Re: New Purchase Order-030220- SMART SOURCING INC.

Error Details Reported error: 550 5.1.10 RESOLVER.ADR.RecipientNotFound?; Recipient info@… not found by SMTP address lookup DSN generated by: BN3PR05MB2643.namprd05.prod.outlook.com

Message Hops HOP TIME (UTC) FROM TO WITH RELAY TIME 1 12/6/2020 7:52:25 PM arc.liv.ac.uk * 2 12/9/2020 2:27:46 PM arc.liv.ac.uk bhmhub2.liv.ac.uk esmtp (Exim 4.92.3) (envelope-from <sge-bugs@…>) 2 days, 18 hr, 35 min, 21 sec 3 12/9/2020 2:27:46 PM localhost bhmhub2.liv.ac.uk esmtp (Exim 4.92.3) (envelope-from <sge-bugs@…>) * 4 12/9/2020 2:27:46 PM bhmhub2.liv.ac.uk chmx1.liv.ac.uk esmtp (Exim 4.92.3) (envelope-from <sge-bugs@…>) * 5 12/9/2020 2:31:33 PM chmx1.liv.ac.uk sophxm.liv.ac.uk ESMTP 3 min, 47 sec 6 12/9/2020 2:31:33 PM sophxm.liv.ac.uk localhost SMTP * 7 12/9/2020 2:31:34 PM sophxm.liv.ac.uk BN8NAM11FT062.mail.protection.outlook.com Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) 1 sec 8 12/9/2020 2:31:35 PM BN8NAM11FT062.eop-nam11.prod.protection.outlook.com BN6PR14CA0024.outlook.office365.com Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) 1 sec 9 12/9/2020 2:31:35 PM BN6PR14CA0024.namprd14.prod.outlook.com BN3PR05MB2643.namprd05.prod.outlook.com Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) *

Original Message Headers

Received: from BN6PR14CA0024.namprd14.prod.outlook.com (2603:10b6:404:79::34)

by BN3PR05MB2643.namprd05.prod.outlook.com (2a01:111:e400:7bb2::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.11; Wed, 9 Dec 2020 14:31:35 +0000

Received: from BN8NAM11FT062.eop-nam11.prod.protection.outlook.com

(2603:10b6:404:79:cafe::6d) by BN6PR14CA0024.outlook.office365.com (2603:10b6:404:79::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Wed, 9 Dec 2020 14:31:35 +0000

Authentication-Results: spf=pass (sender IP is 138.253.100.164)

smtp.mailfrom=liverpool.ac.uk; smart-sourcing.com; dkim=none (message not signed) header.d=none;smart-sourcing.com; dmarc=pass action=none header.from=liverpool.ac.uk;

Received-SPF: Pass (protection.outlook.com: domain of liverpool.ac.uk

designates 138.253.100.164 as permitted sender) receiver=protection.outlook.com; client-ip=138.253.100.164; helo=sophxm.liv.ac.uk;

Received: from sophxm.liv.ac.uk (138.253.100.164) by

BN8NAM11FT062.mail.protection.outlook.com (10.13.177.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Wed, 9 Dec 2020 14:31:34 +0000

Received: from sophxm.liv.ac.uk (localhost [127.0.0.1])

by localhost (Postfix) with SMTP id A23F42601A4; Wed, 9 Dec 2020 14:31:33 +0000 (GMT)

Received: from chmx1.liv.ac.uk (chmx1.liv.ac.uk [138.253.100.141])

by sophxm.liv.ac.uk (Postfix) with ESMTP id 9C25C26019E; Wed, 9 Dec 2020 14:31:33 +0000 (GMT)

Received: from bhmhub2.liv.ac.uk ([138.253.100.154])

by chmx1.liv.ac.uk with esmtp (Exim 4.92.3) (envelope-from <sge-bugs@…>) id 1kn0RW-0003wZ-Bl; Wed, 09 Dec 2020 14:27:46 +0000

Received: from localhost ([127.0.0.1] helo=bhmhub2.liv.ac.uk)

by bhmhub2.liv.ac.uk with esmtp (Exim 4.92.3) (envelope-from <sge-bugs@…>) id 1kn0RW-0005MS-9c; Wed, 09 Dec 2020 14:27:46 +0000

Received: from arc.liv.ac.uk ([138.253.242.206])

by bhmhub2.liv.ac.uk with esmtp (Exim 4.92.3) (envelope-from <sge-bugs@…>) id 1kn0RW-0005BH-5d; Wed, 09 Dec 2020 14:27:46 +0000

Received: by arc.liv.ac.uk (Postfix, from userid 33)

id 4FE2C4C7F; Sun, 6 Dec 2020 19:52:25 +0000 (GMT)

MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit From: "SGE" <sge-bugs@…> X-Trac-Version: 1.0.13 Precedence: bulk CC: sge-bugs@… Auto-Submitted: auto-generated X-Mailer: Trac 1.0.13, by Edgewall Software To: info@…, postmaster@… X-Trac-Project: SGE Date: Sun, 06 Dec 2020 19:52:25 -0000 Reply-To: X-URL: https://arc.liv.ac.uk/trac/SGE Subject: Re: [SGE] #1719: Re: New Purchase Order-030220- SMART SOURCING INC. X-Trac-Ticket-URL: https://arc.liv.ac.uk/trac/SGE/ticket/1719 Message-ID: <080.193539a1592e64519f8623a098077873@…> References: <065.3a19984644b7198841a93b18077daba6@…> X-Trac-Ticket-ID: 1719 In-Reply-To: <065.3a19984644b7198841a93b18077daba6@…> Return-Path: sge-bugs@… X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 591a7d31-4300-4fc5-ab7c-aaad0ceb2756:0 X-MS-PublicTrafficType?: Email X-MS-Office365-Filtering-Correlation-Id: 2f712eab-20de-4284-6b8a-08d89c4f212d X-MS-TrafficTypeDiagnostic?: BN3PR05MB2643:

untitled-part.bin

untitled-part.mht

#1719: Re: New Purchase Order-030220- SMART SOURCING INC.


Reporter: info@… | Owner:

Type: defect | Status: new

Priority: normal | Milestone:

Component: sge | Version: 8.1.9

Severity: minor | Resolution: Keywords: |


Changes (by postmaster@…):

  • Attachment "untitled-part-600.mht" removed.

Added by email2trac

-- Ticket URL: <https://arc.liv.ac.uk/trac/SGE/ticket/1719> SGE <https://arc.liv.ac.uk/trac/SGE> Son of Grid Engine: Community continuation of work on Grid Engine

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 22/11/16 11:06:43