Help

Using the Advanced (MQL) filter

Introducing the Advanced filter

Mingle 2.1 introduced the ability to filter cards by MQL. The Advanced filter is very useful if you need more powerful searches that the regular filter cannot provide, such as finding cards that are either of a particular card type OR a particular card property value. The Advanced filter uses MQL to filter cards in the same way that MQL is used in Mingle's macros.

To use MQL to filter cards you may want to make yourself familiar with it by reviewing the Macro and MQL reference.

When to use the Advanced filter

The Advanced filter can be used on the card list and grid views to find specific cards. The Advanced filter cannot be used on the card list and grid views when a tree is selected but the tree filter is available to filter in these views. The Advanced filter can be used to filter cards using the same type of queries as are used in the regular filter.

The Advanced filter can also be used to filter for more complex and specific card searches. For example, if you want to find one type of card with one status and another type of card with either of two different statuses you could use a MQL query such as this:

(Type = Story AND Status = Open) OR (Type = Defect AND ('Defect status' = Open OR 'Defect Status' = New)) 

Preview

Example Advanced filter

This MQL query will return all cards of type Story AND any cards of type Defect that have a Defect Status property where the value is Open or New.

For more information on combining MQL queries see "How to combine MQL queries" below

Using MQL in the card filter

The MQL syntax that should be used to filter the cards is the same as that used in the WHERE or conditions parts of Mingle macros.

How to specify simple MQL queries

  • To find cards that are Defects use:

    Type = Defect 
    This MQL query will return all cards of type Defect and no other card types.

  • To find all cards that are not Open use:

    Status != Open 
    This MQL query will return any card types that have a Status property where the value is NOT Open.

If the specified property is valid for multiple card types all types that are relevant will be returned in the results.

How to combine MQL queries

You can combine MQL conditions using AND, OR or parentheses.

  • To find cards that are either stories OR are Open use:
    Type = Story OR Status = Open
    This MQL query will return all cards of type Story AND any cards of any card type that have a Status property where the value is Open.
  • To find cards that are Open stories:

    Type = Story AND Status = Open
    This MQL query will return only cards of type Story that have a Status property where the value is Open.

  • To find cards that are either stories in any status OR open defects:

    Type = Story OR (Type = Defect AND Status = Open) 
    This MQL query will return all cards of type Story AND cards of type Defect that have a Status property where the value is Open.

How to use MQL keywords

There are several MQL keywords that can also be used in the Advanced filter to quickly refine the cards.

To find cards for the 'current user':
Owner = CURRENT USER AND 'Fixed on' = TODAY 

For more information on MQL keywords see MQL reference.

How to avoid MQL errors

Unlike MQL that is used in some of the Mingle macros, MQL filtering does not support the use of SELECT, WHERE, AVERAGE, COUNT, SUM, ORDER BY, GROUP BY or THIS CARD. Using these in the filter will result in a MQL syntax error.

Saving Advanced filters as favorites and tabs

Like the regular filter, Advanced filters can be saved as favorites and tabs. Simply filter your cards by the required MQL and use the 'Make current view favorite...' link.