Using the MQL filter
Introducing the MQL filter
Mingle 2.1 introduces the ability to filter cards by MQL. The MQL filter is very useful if you need more powerful searches that the regular filter can not provide, such as finding cards that are either of a particular card type OR a particular card property value. The MQL 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 MQL filter
The MQL filter can be used on the card list and grid views to find specific cards. The MQL filter can not 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 MQL filter can be used to filter cards using the same type of queries as are used in the regular filter.
Unlike the regular card filter card "Quick Add" is unavailable when the MQL filter is selected.
(Type = Story AND Status = Open) OR (Type = Defect AND ('Defect status' = Open OR 'Defect Status' = New))
Preview
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 MQL filter to quickly refine the cards.
To find cards for the 'current user':Owner = CURRENT USER AND 'Fixed on' = TODAY
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.
MQL filters as favorites and tabs
Like the regular filter, MQL filters can be saved as favorites and tabs. Simply filter your cards by the required MQL and use the 'Make current view favorite...' link.