...
...
...
We are happy to introduce search functions. First functions are to filter assets by referenced assets. More functions will be added later.
...
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
This page is about Assets & Inventory Plugin for Jira DC. Using Cloud? Click here. |
The Asset Navigator search functions provide tools for filtering assets based on their relationships with other assets. This documentation introduces two key functions: referenceAsset
and referenceAssetByType
.
These functions allow you to target assets based on the values of their referenced assets, enabling you to perform complex and specific searches within the Asset Navigator.
On this page:
|
---|
referenceAsset
Info |
---|
This feature is introduced at AIP v7.0.1. |
referenceAsset function lets you
...
filter assets by referenced assets value. For example, there is a Computer asset
...
that has a Mouse reference asset. You can filter all Computers
...
that have a Mouse and are assigned to a user such as current, reporter, assignee, or a specific user.
You can use this function at Basic Search of Asset Navigator for "Asset List" or "Asset List by Asset Type" type of attributes.
Field names are case-sensitive.
Syntax | referenceAsset("FIELD NAME 1", "VALUE 1", "FIELD NAME 2", "VALUE 2", ..) |
---|---|
Supported fields | "Asset List", "Asset List by Asset Type" |
Description | Field name and value pairs are expected. Number of parameters should be an even number. |
Examples:
Field name to query | Description | Examples |
---|---|---|
Text-Based System Fields:
Text-Based Attributes (User defined fields):
Use exact field name for attributes. Field names are case sensitive | Query with free text. If the text |
...
has any double quotes, they must be escaped |
...
. |
...
For example: "My \"text\" here" |
...
Wildcard search is supported, see: |
...
Wildcard search for more details. | Query exact match (surrounded with double quotes) with one text based system field Asset Tag: With Serial Number: Query with 3 different type of field values at a time. First Name is a Text field, Jira User is a Jira Single User Select field and Cities is a checkbox field: Query for surname that have |
...
starts with Query for a url with exact match: |
...
User based System Fields:
User based Attributes (User defined fields):
Use exact field name for attributes. Field names are case sensitive | Query with user name or user key. Variables: Following variables are available:
| Query with user key: referenceAsset("asset.assignee", "JIRAUSER18101") Query with user name: referenceAsset("asset.owner", "tyler") Query "Jira Users" field contains user "marla" and city is Ada. referenceAsset("Jira Users", "marla", "City", "Ada") |
User Picker based Attributes (User defined fields)
Use exact field name for attributes. Field names are case sensitive | This field stores user name (other user fields holds Jira user key). Additionally enables display name search. Searching with function variables:
$repoter and $assignee works just like $currentUser, except if $reporter is not found, currently logged in user is used.
| Exact user name search: referenceAsset("Jira User Picker", "\"agrant-sd-demo\"") Display name having a word starts with ala (wildcard text search): referenceAsset("Jira User Picker", "ala*") Display name is exactly equals to "Alana Grant" referenceAsset("Jira User Picker", "\"Alana Grant\"") E-mail address is exactly equals to "agrant-sd-demo@example.com" referenceAsset("Jira User Picker", "\"agrant-sd-demo@example.com\"") Search with currently logged in user. referenceAsset("Jira User Picker", "$currentUser") referenceAsset("Jira User Picker", "\"$reporter.email\"") |
List based System Fields:
List based Attributes (User defined fields):
Use exact field name for attributes. Field names are case sensitive | Put 3 @ chars between keywords like "Ada@@@Sel" | Query Cities having İstanbul: referenceAsset("Cities", "İstanbul") Query Cities having Lima or İstanbul: referenceAsset("Cities", "Lima@@@İstanbul") Query Belongs to Group system field having managers: referenceAsset("asset.belongsToGroup", "managers") Query Belongs to Group system field having managers or jira-developers: referenceAsset("asset.belongsToGroup", "managers@@@jira-developers") Query "Status" system field is "In Stock" and "Substatus" system field is "Defective". These values must be English value of the field: referenceAsset("asset.status", "In stock", "asset.substatus", "Defective") |
Numeric System Fields:
Numeric Attributes (User defined fields):
Use exact field name for attributes. Field names are case sensitive | Use dot "." as decimal separator. | Exact search: referenceAsset("Item Price", "120.45") referenceAsset("Item Age", "21") Range search: Between 120 and 139 (120 and 139 are included) referenceAsset("Number Float", "120@@@139") Less than 139 or equal to 139 referenceAsset("Number Float", "@@@139") Bigger than 110 or equal to 110 referenceAsset("Number Float", "110@@@") System field Cost (between 10 and 120) and currency (EUR) search. referenceAsset("asset.cost", "10@@@120", "asset.costCurrency", "EUR") |
Date and Date-Time System Fields:
Date and Date-Time Attributes (User defined fields):
Use exact field name for attributes. Field names are case sensitive | Field value must be in ISO date and date-time format:
| Exact search: referenceAsset("asset.installDate", "2020-06-01") Range search: referenceAsset("asset.installDate", "2020-05-01@@@2020-06-02") referenceAsset("asset.installDate", "@@@2020-06-02") referenceAsset("asset.installDate", "2020-05-01@@@") |
"Asset List" and "Asset List by Asset Types" Attributes Use exact field name for attributes. Field names are case sensitive | Put hashtag before asset Id for reference asset search. referenceAsset of referenceAsset script search is not ready yet. | Single value search: referenceAsset("Child Asset", "#644") Multiple value search: referenceAsset("Child Asset", "#642@@@#644") |
referenceAssetByType
Info |
---|
This feature is introduced at AIP v7.0.4. |
referenceAssetByType works just
...
like referenceAsset with one more additional parameter, which lets you
...
filter assets by asset type.
referenceAssetByType("ASSET TYPE NAME", "FIELD NAME 1", "VALUE 1", "FIELD NAME 2", "VALUE 2")
Function signature | referenceAssetByType("ASSET TYPE NAME 1", "FIELD NAME 1", "VALUE 1", "FIELD NAME 2", "VALUE 2", ...) |
Description | Asset type, field name and value parameters are expected. Number of parameters should be 3 |
...
, 5, or 7 |
...
. |
Example: referenceAssetByType("Mouse", "Model", "pandas", "Vendor", "apple")
Screenshots of usage
Personal Computer has Mouse Inventory and assets are filtered by reference assets having asset type=Mouse, model=pandas, vendor=apple.
Final search script is: referenceAssetByType("Mouse", "Model", "pandas", "Vendor", "apple")
...
...
...