JQL Syntax
lookup(<Table>, <Lookup Column>, <Lookup Value>, <Mapped Column>, <Mode>)
|
Parameter |
Description |
|---|---|
|
<Table> |
The lookup table name |
|
<Lookup Column> |
The column name to perform the lookup |
|
<Lookup Value> |
The value used to perform the lookup |
|
<Mapped Column> |
The column name to return if there is any matching row |
|
<Mode> |
The mode for returning values
|
Supported Operators
|
IN |
NOT IN |
= |
!= |
< |
> |
<= |
>= |
IS |
IS NOT |
WAS |
WAS IN |
WAS NOT |
WAS NOT IN |
CHANGED |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
An Example
Using the example from Support multiple categories for Jira Project , if there is a Lookup Table named Project Category Table with 3 columns (Project Name, Project Key, Category)
|
Project Name |
Project Key |
Category |
Remarks |
|---|---|---|---|
|
Customer Service project |
CS |
BUSINESS |
|
|
Customer Service project |
CS |
CUSTOMER |
|
|
Development project |
DEV |
BUSINESS |
|
|
Framework Development project |
FRAM |
CUSTOMER |
|
|
Framework Development project |
FRAM |
INTERNAL |
|
|
QA project |
QA |
BUSINESS |
|
|
QA project |
QA |
INTERNAL |
|
The lookup JQL function
project in lookup("Project Category Table", "Category", "Business", "Project Key", "all")
will be translated to
project in (CS, DEV, QA)
For reference,
|
Parameter |
Description |
Value in Example |
|---|---|---|
|
<Table> |
The lookup table name |
Project Category Table |
|
<Lookup Column> |
The column name to perform the lookup |
Category |
|
<Lookup Value> |
The value used to perform the lookup |
BUSINESS |
|
<Mapped Column> |
The column name to return if there is any matching row |
Project Key |
|
<Mode> |
The mode for returning values
|
all |
If you use
project in lookup("Project Category Table", "Category", "Business", "Project Key", "first")
it will be translated to
project in (CS)
Learn More
-
Use lookup() function to Support multiple categories for Jira Project
-
Use lookup() function to Support mapping between Product Owner and Jira Project