Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
panelIconIdatlassian-info
panelIcon:info:
panelIconText:info:
bgColor#F4F5F7

This page is about Assets & Inventory Plugin for Jira DC. Using Cloud? Click here.

Example

This example searches for assets with asset type "all All types" and asset ids between 10494 and 10495. And IDs between 10494 and 10495, and then extracts asset field values, which contains contain core, system, and attribute values.

If you would like to override security

...

, use aipIndexService.queryDocsForObjectOverrideSecurity

...

. If you want permission to check with the current user

...

, use aipIndexService.queryDocsForObject.

Script

...

Prerequisites

  • Familiarity with Java and Groovy programming languages

  • Understanding of JSM API

Filter out assets at search

Navigate to Asset Navigator and perform the search. You can select multiple options to filter assets.

Script

Expand
titleScript:
Code Block
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import groovy.transform.Field
import inventoryplugin.service.
constant
status.StatusEnum
import inventoryplugin.service.
constant
status.SubstatusEnum
import inventoryplugin.dto.portable.InventoryDto
import inventoryplugin.dto.portable.InventoryItemDto
import inventoryplugin.helper.JipUtilityHelper
import inventoryplugin.service.index.AipIndexService
import inventoryplugin.service.index.search.QueryIndexParam
import inventoryplugin.service.index.search.QueryIndexResult
import inventoryplugin.service.index.search.QueryIndexSearchParam
import inventoryplugin.service.rest.dto.SystemFieldDto
import org.apache.log4j.Level
import org.apache.log4j.Logger

@Field Logger logger = Logger.getLogger("snapbytes.inventoryplugin.groovy.script")
logger.setLevel(Level.DEBUG)

@WithPlugin("plugin.jip")

@PluginModule
AipIndexService aipIndexService

try {
    QueryIndexParam queryIndexParam = new QueryIndexParam();
    queryIndexParam.setQuerySource(QueryIndexParam.QuerySource.GENERIC_SEARCH);
    queryIndexParam.setSortField("asset.name");
    queryIndexParam.setSortDirection("asc");
    queryIndexParam.setSortType("STRING");
    queryIndexParam.setSearchType("basic");
    queryIndexParam.setPageNumber(1);
    queryIndexParam.setPageSize(1000);
    queryIndexParam.setQueryIndexSearchParams(new ArrayList<>());

    // filter by asset type
    QueryIndexSearchParam query = new QueryIndexSearchParam();
    query.setField("form.name");
    query.setKeywords(new ArrayList<>());
    query.getKeywords().add("all types");
    query.setRange(true);
    queryIndexParam.getQueryIndexSearchParams().add(query);

    QueryIndexSearchParam query2 = new QueryIndexSearchParam();
    query2.setField("asset.id");
    query2.setMinNum(10494);
    query2.setMaxNum(10495);
    query2.setRange(true);
    queryIndexParam.getQueryIndexSearchParams().add(query2);

    def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
    //QueryIndexResult queryIndexResult = aipIndexService.queryDocsForObject(queryIndexParam, user);
    QueryIndexResult queryIndexResult = aipIndexService.queryDocsForObjectOverrideSecurity(queryIndexParam, user);
    def queryIndexResultAsTxt = JipUtilityHelper.convertObjectToJsonStringSafe(queryIndexResult);

    List<InventoryDto> assets = JipUtilityHelper.convertJsonStringToListSafe(queryIndexResult.getAssets(), InventoryDto.class);

    if (assets != null) {
        logger.debug(assets.size() + ' assets found')

        for (InventoryDto oneAsset : assets) {
            logger.debug('----------------------------------------------------')
            logger.debug('----------------------------------------------------')
            logger.debug('Asset id: ' + oneAsset.id)
            logger.debug('Asset name: ' + oneAsset.name)
            logger.debug('Asset type id: ' + oneAsset.formId)
            logger.debug('Asset type name: ' + oneAsset.formName)
            logger.debug('Asset type scheme id: ' + oneAsset.objectSchemaId)
            logger.debug('Asset type scheme name: ' + oneAsset.objectSchemaName)
            logger.debug('Attachments json string: ' + oneAsset.attachments)
            logger.debug('Updated by: ' + oneAsset.updatedBy)
            logger.debug('Updated at: ' + oneAsset.updated)
            logger.debug('Created by: ' + oneAsset.creator)
            logger.debug('Created at: ' + oneAsset.created)

            logger.debug('--- Attributes ----------------------')
            List<InventoryItemDto> inventoryItems = oneAsset.getInventoryItems();
            for (InventoryItemDto assetAttr : inventoryItems) {

                if (assetAttr.
multiListValues
attributeType 
!
== 
null &&
'InventoryList' || assetAttr.
multiListValues.size() > 0
attributeType == 'InventoryListByForm') {
                    logger.debug(assetAttr.attributeName + ': ');
                    for (def oneVal : assetAttr.
multiListValues
inventoryRefs) {
                        logger.debug('       - id:' + oneVal
);
.id + ', name:' + oneVal.name);
                    }
                } else if (assetAttr.attributeType == '
InventoryList
DatePicker' || assetAttr.attributeType == '
InventoryListByForm
DatetimePicker') {
                    logger.debug(assetAttr.attributeName + ': ' + assetAttr.isoDateValue);
                } else 
for
if (
def oneVal : assetAttr.inventoryRefs
assetAttr.attributeType == 'JiraMultipleUsers') {

                    logger.debug(assetAttr.attributeName + ': ');
     
-
 
id:'
 
+
 
oneVal.id
 
+
 
',
 
name:'
 
+
 
oneVal.name);
       if (assetAttr.users != null && assetAttr.users.size() > 0) {
     
}
                 
}
 
else
 
if
for (
assetAttr.attributeType == 'DatePicker' ||
def oneUser : assetAttr.
attributeType == 'DatetimePicker'
users) {
                    
logger.debug(assetAttr.attributeName
 
+
 
':
 
'
 
+
 
assetAttr.isoDateValue);
   logger.debug("     ----- " 
);
     
}
 
else
 
{
                     logger.debug(
assetAttr.attributeName
" 
+
 
':
 
'
 
+
 
assetAttr.value + " (Display value=
- name: " + 
assetAttr.displayValue + ")")
oneUser.name);
                
}
            
}
logger.debug("     - key: " + oneUser.key);
         
logger.debug('---
 
System
 
Fields
 
----------------------')
             
List<SystemFieldDto>
 
systemFields
 
=
 
oneAsset
logger.
getSystemFields
debug(
);
"     - display name: " + oneUser.displayName);
  
for
 
(SystemFieldDto
 
systemFieldDto
 
:
 
systemFields)
 
{
                  
if
 
(systemFieldDto.fieldName
 
==
 
"asset
logger.
status
debug("
)
 
{
    - email address: " + oneUser.emailAddress);
               
def
 
status
 
=
 
StatusEnum.getByKey(systemFieldDto.value);
          logger.debug("     - active: " + oneUser.active);
 
String
 
displayValue
 
=
 
status
 
!=
 
null
 
?
 
status.displayName
 
:
 
""
              }
      
logger.debug(systemFieldDto.fieldName
 
+
 
':
 
'
 
+
 
systemFieldDto.value
 
+
 
"
 
(Display
 
value:
 
"
 
+
 
displayValue
 
+
 
")");
}
                } else if (
systemFieldDto
assetAttr.
fieldName
attributeType == 
"asset.substatus"
'JiraSingleUser' || assetAttr.attributeType == 'UserPicker') {
                    
def substatus = SubstatusEnum.getByKey(systemFieldDto.value
logger.debug(assetAttr.attributeName + ': ');
                    
String displayValue = substatus
if (assetAttr.user != null) {
?
 
substatus.displayName
 
:
 
""
                     logger.debug(
systemFieldDto.fieldName
" 
+
 
':
 
'
 
+
 
systemFieldDto.value + " (Display value
- name: " + 
displayValue + ")")
assetAttr.user.name);
                
} else {
        logger.debug("     - key: " + assetAttr.user.key);
                        logger.debug(
systemFieldDto.fieldName + ': '
"     - display name: " + 
systemFieldDto
assetAttr.user.
value
displayName);
                
}
        logger.debug("     
}
- email address: " + assetAttr.user.emailAddress);
   
}
     
}
     
return
 
queryIndexResultAsTxt;
  
}
 
catch
 
(Exception
 
e)
 
{
    
logger.debug(
e.getMessage())
"     - active: " 
return
+ 
e.getMessage(); }
assetAttr.user.active);
                    }
      

Output

Code Block
2020-06-23 17:15:18,630 DEBUG [groovy.script]: 2 assets found 2020-06-23 17:15:18,630 DEBUG [groovy.script]: ----------------------------------------------------
          } else if (assetAttr.attributeType == 'URL') {
                    logger.debug(assetAttr.attributeName + ': ' + assetAttr.value);
                } else if (assetAttr.multiListValues != null && assetAttr.multiListValues.size() > 0) {
                    logger.debug(assetAttr.attributeName + ': ');
                    for (def oneVal : assetAttr.multiListValues) {
                        logger.debug('       - ' + oneVal);
                    }
                } else {
                    String displayValue = (assetAttr.displayValue != null && assetAttr.displayValue != assetAttr.value) ? (", (Display value: " + assetAttr.displayValue + ")") : ""
                    logger.debug(assetAttr.attributeName + ': ' + assetAttr.value + displayValue);
                }
            }

            logger.debug('--- System Fields ----------------------')
            List<SystemFieldDto> systemFields = oneAsset.getSystemFields();
            for (SystemFieldDto systemFieldDto : systemFields) {

                if (systemFieldDto.fieldName == "asset.status") {
                    def status = StatusEnum.getByKey(systemFieldDto.value);
                    String displayValue = status != null ? status.displayName : ""
                    logger.debug(systemFieldDto.fieldName + ': ' + systemFieldDto.value + " (Display value: " + displayValue + ")");
                } else if (systemFieldDto.fieldName == "asset.substatus") {
                    def substatus = SubstatusEnum.getByKey(systemFieldDto.value);
                    String displayValue = substatus != null ? substatus.displayName : ""
                    logger.debug(systemFieldDto.fieldName + ': ' + systemFieldDto.value + " (Display value: " + displayValue + ")");
                } else {
                    logger.debug(systemFieldDto.fieldName + ': ' + systemFieldDto.value);
                }
            }
        }
    }
    return queryIndexResultAsTxt;

} catch (Exception e) {
    logger.debug(e.getMessage())
    return e.getMessage();
}

Output

Expand
titleOutput:
Code Block
2020-06-23 17:37:28,849 DEBUG [groovy.script]: 2 assets found
2020-06-23 17:37:28,849 DEBUG [groovy.script]: ----------------------------------------------------
2020-06-23 17:37:28,850 DEBUG [groovy.script]: ----------------------------------------------------
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Asset id: 10494
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Asset name: all two - clone 3
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Asset type id: 36
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Asset type name: all types
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Asset type scheme id: 2
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Asset type scheme name: HR Assets
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Attachments json string: [ {
  "originalFileName" : "marla.jpg",
  "serverFileName" : "10653_77560_1591789643914.jpg",
  "fileSize" : "24 KB",
  "created" : "10/Jun/20 2:47 PM",
  "creator" : "admin"
} ]
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Updated by: admin
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Updated at: Tue Jun 23 17:24:06 MSK 2020
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Created by: admin
2020-06-23 17:37:28,850 DEBUG [groovy.script]: Created at: Wed Jun 10 14:37:02 MSK 2020
2020-06-23 17:37:28,850 DEBUG [groovy.script]: --- Attributes ----------------------
2020-06-23 17:37:28,851 DEBUG [groovy.script]: all - Asset list: 
2020-06-23 17:37:28,851 DEBUG [groovy.script]:        - id:183, name:admin çalışanı
2020-06-23 17:37:28,851 DEBUG [groovy.script]:        - id:221, name:Asset Name 0001
2020-06-23 17:37:28,851 DEBUG [groovy.script]: all - asset list by type: 
2020-06-23 17:37:28,851 DEBUG [groovy.script]:        - id:10379, name:blue pc
2020-06-23 17:37:28,851 DEBUG [groovy.script]:        - id:138, name:Emp 001
2020-06-23 17:37:28,851 DEBUG [groovy.script]: all - checkbox: 
2020-06-23 17:37:28,852 DEBUG [groovy.script]:        - ada
2020-06-23 17:37:28,852 DEBUG [groovy.script]:        - bal
2020-06-23 17:37:28,852 DEBUG [groovy.script]: all - date picker: 2019-12-24
2020-06-23 17:37:28,852 DEBUG [groovy.script]: all - date time picker: 2019-12-31T14:39
2020-06-23 17:37:28,852 DEBUG [groovy.script]: all - dropdown list: cam
2020-06-23 17:37:28,852 DEBUG [groovy.script]: all - IP: 192.168.1.1
2020-06-23 17:37:28,852 DEBUG [groovy.script]: all - IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
2020-06-23 17:37:28,852 DEBUG [groovy.script]: All - Jira user: 
2020-06-23 17:37:28,852 DEBUG [groovy.script]:      - name: tyler
2020-06-23 17:37:28,852 DEBUG [groovy.script]:      - key: tyler
2020-06-23 17:37:28,852 DEBUG [groovy.script]:      - display name: Tyler Durden
2020-06-23 17:37:28,852 DEBUG [groovy.script]:      - email address: tyler@example.com
2020-06-23 17:37:28,852 DEBUG [groovy.script]:      - active: true
2020-06-23 17:37:28,852 DEBUG [groovy.script]: all - jira single user: 
2020-06-23 17:37:28,852 DEBUG [groovy.script]:      - name: agrant-sd-demo
2020-06-23 17:37:28,852 DEBUG [groovy.script]:      - key: agrant-sd-demo
2020-06-23 17:
15
37:
18
28,
630
852 DEBUG [groovy.script]:      - display name: Alana Grant
2020-
--------------------------------------------------
06-23 17:37:28,852 DEBUG [groovy.script]:      - email address: agrant-sd-demo@example.com
2020-06-23 17:37:28,852 DEBUG [groovy.script]:      - active: true
2020-06-23 17:
15
37:
18
28,
630
852 DEBUG [groovy.script]:
Asset id
 all - jira multiple users: 
10494

2020-06-23 17:
15
37:
18
28,
630
852 DEBUG [groovy.script]: 
Asset
  
name:
 
all
 
two
 ----- 
clone

3
2020-06-23 17:
15
37:
18
28,
630
852 DEBUG [groovy.script]:     
Asset
 
type
- 
id
name: 
36
mdavis-sd-demo
2020-06-23 17:
15
37:
18
28,
630
852 DEBUG [groovy.script]:     
Asset
 
type
- 
name
key: 
all types
mdavis-sd-demo
2020-06-23 17:
15
37:
18
28,
630
852 DEBUG [groovy.script]: 
Asset type scheme id: 2
     - display name: Mitch Davis
2020-06-23 17:
15
37:
18
28,
630
852 DEBUG [groovy.script]:   
Asset
   
type
- 
scheme
email 
name
address: 
HR Assets
mdavis-sd-demo@example.com
2020-06-23 17:
15
37:
18
28,
631
852 DEBUG [groovy.script]:
Attachments
 
json
 
string:
 
[
 
{
  - 
"originalFileName"
active: 
"marla.jpg", "serverFileName" : "10653_77560_1591789643914.jpg", "fileSize" : "24 KB", "created" : "10/Jun/20 2:47 PM", "creator" : "admin" } ]
true
2020-06-23 17:37:28,853 DEBUG [groovy.script]:      ----- 
2020-06-23 17:
15
37:
18
28,
631
853 DEBUG [groovy.script]:
Updated by
      - name: 
admin
assetuser
2020-06-23 17:
15
37:
18
28,
631
853 DEBUG [groovy.script]:  
Updated
 
at:
 
Wed
 
Jun
 
10
- 
14:47
key:
23
 
MSK 2020
assetuser
2020-06-23 17:
15
37:
18
28,
631
853 DEBUG [groovy.script]:
Created by: admin
      - display name: Asset User 1
2020-06-23 17:
15
37:
18
28,
631
853 DEBUG [groovy.script]: 
Created
   
at:
 
Wed
 
Jun
- 
10
email 
14
address:
37:02 MSK 2020
 asset-user@example.com
2020-06-23 17:
15
37:
18
28,
631
853 DEBUG [groovy.script]:
--
      - 
Attributes ----------------------
active: true
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: all - 
Asset list
listbox: lahmacun
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: 
all - 
id:183, name:admin çalışanı
listbox multiple: 
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]:        - 
id:221, name:Asset Name 0001
mavi
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]:   
all
 
-
 
asset
 
list
 
by
 
type:
- kırmızı
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: 
all 
- 
id:10379, name:blue pc
number long: 120
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: 
all - 
id:138, name:Emp 001
number float: 150
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: all - 
checkbox
radio: paranoid
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: all - text: sample text 
here
- ada
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: all - text area: more sample 
-
text 
bal
here
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: all - 
date
url: 
picker: 2019-12-24
https://jira-test.snapbytes.com/
2020-06-23 17:
15
37:
18
28,
632
853 DEBUG [groovy.script]: 
all
--- 
date
System 
time picker: 2019-12-31T14:39
Fields ----------------------
2020-06-23 17:
15
37:
18
28,
632
854 DEBUG [groovy.script]: 
all - dropdown list: cam (Display value=cam)
asset.quantity: 100
2020-06-23 17:
15
37:
18
28,
632
854 DEBUG [groovy.script]: 
all - IP: 192.168.1.1 (Display value=192.168.1.1)
asset.reservedFor: vwong-sd-demo
2020-06-23 17:
15
37:
18
28,
632
854 DEBUG [groovy.script]
: all - IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 (Display value=2001:0db8:85a3:0000:0000:8a2e:0370:7334)
: asset.costCurrency: USD
2020-06-23 17:
15
37:
18
28,
632
854 DEBUG [groovy.script]: 
All - Jira user
asset.assetTag: 
admin (Display value=admin (admin))
asset tag
2020-06-23 17:
15
37:
18
28,
632
854 DEBUG [groovy.script]: 
all - jira single user
asset.owner: agrant-sd-demo
(Display value=Alana Grant

(agrant-sd-demo))
2020-06-23 17:
15
37:
18
28,
632
854 DEBUG [groovy.script]: 
all - jira multiple users:
asset.serialNumber: my serial 101
2020-06-23 17:
15
37:
18
28,
632
855 DEBUG [groovy.script]: asset.status: 1 (Display value: 
- mdavis-sd-demo
In stock)
2020-06-23 17:
15
37:
18
28,
633
855 DEBUG [groovy.script]: 
- assetuser
asset.installDate: 2020-06-10
2020-06-23 17:
15
37:
18
28,
633
855 DEBUG [groovy.script]: 
all - listbox: lahmacun (Display value=lahmacun)
asset.managedBy: mdavis-sd-demo
2020-06-23 17:
15
37:
18
28,
633
856 DEBUG [groovy.script]: 
all - listbox multiple:
asset.substatus: 2 (Display value: Reserved)
2020-06-23 17:
15
37:
18
28,
633
856 DEBUG [groovy.script]: 
- mavi
asset.assignee: rlee-sd-demo
2020-06-23 17:
15
37:
18
28,
633
856 DEBUG [groovy.script]: asset.belongsToGroup: [ 
- kırmızı
"jira-servicedesk-users", "jira-software-users" ]
2020-06-23 17:
15
37:
18
28,
633
856 DEBUG [groovy.script]: 
all - number long: 120 (Display value=120)
asset.cost: 1200
2020-06-23 17:
15
37:
18
28,
633
856 DEBUG [groovy.script]
: all - number float: 150 (Display value=150)
: asset.location: 2
2020-06-23 17:
15
37:
18
28,
633
856 DEBUG [groovy.script]: 
all - radio
asset.invoiceNumber: 
paranoid
my 
(Display value=paranoid)
invoice 10387
2020-06-23 17:
15
37:
18
28,
633 DEBUG [groovy.script]: all - text: sample text here (Display value=sample text here)
857 DEBUG [groovy.script]: ----------------------------------------------------
2020-06-23 17:
15
37:
18
28,
633
857 DEBUG [groovy.script]: 
all - text area: more sample text here (Display value=more sample text here)
----------------------------------------------------
2020-06-23 17:
15
37:
18
28,
633
857 DEBUG [groovy.script]: 
all
Asset 
-
id: 
url: https://jira-test.snapbytes.com/ (Display value=<a style="font-size: 100%" href="https://jira-test.snapbytes.com/" target="_blank">https://jira-test.snapbytes.com/</a>)
10495
2020-06-23 17:37:28,857 DEBUG [groovy.script]: Asset name: all two - clone 4
2020-06-23 17:
15
37:
18
28,
633
857 DEBUG [groovy.script]: 
---
Asset 
System
type 
Fields ----------------------
id: 36
2020-06-23 17:
15
37:
18
28,
634
857 DEBUG [groovy.script]: 
asset.quantity
Asset type name: 
100
all types
2020-06-23 17:
15
37:
18
28,
634
857 DEBUG [groovy.script]:
asset.costCurrency
 Asset type scheme id: 
USD
2
2020-06-23 17:
15
37:
18
28,
634
857 DEBUG [groovy.script]:
asset.reservedFor: vwong-sd-demo
 Asset type scheme name: HR Assets
2020-06-23 17:
15
37:
18
28,
634
857 DEBUG [groovy.script]: 
asset.assetTag: asset tag 2020-06-23 17:15:18,634 DEBUG [groovy.script]: asset.owner: agrant-sd-demo 2020-06-23 17:15:18,634 DEBUG [groovy.script]: asset.serialNumber: my serial 101 2020-06-23 17:15:18,635 DEBUG [groovy.script]: asset.status: 1 (Display value: In stock) 2020-06-23 17:15:18,635 DEBUG [groovy.script]: asset.installDate: 2020-06-10 2020-06-23 17:15:18,635 DEBUG [groovy.script]: asset.managedBy: mdavis-sd-demo 2020-06-23 17:15:18,636 DEBUG [groovy.script]: asset.substatus: 2 (Display value: Reserved) 2020-06-23 17:15:18,636 DEBUG [groovy.script]: asset.assignee: rlee-sd-demo 2020-06-23 17:15:18,636 DEBUG [groovy.script]: asset.belongsToGroup: [ "jira-servicedesk-users", "jira-software-users" ] 2020-06-23 17:15:18,636 DEBUG [groovy.script]: asset.location: 2
Attachments json string: [ {
  "originalFileName" : "Marla_Singer_2.jpg",
  "serverFileName" : "10163_48190_1591789628314.jpg",
  "fileSize" : "27 KB",
  "created" : "10/Jun/20 2:47 PM",
  "creator" : "admin"
}, {
  "originalFileName" : "xps13-2.jpg",
  "serverFileName" : "23815_70783_1591870901186.jpg",
  "fileSize" : "42 KB",
  "created" : "11/Jun/20 1:21 PM",
  "creator" : "admin"
}, {
  "originalFileName" : "bobswift example2.groovy",
  "serverFileName" : "06040_73967_1592483691399.groovy",
  "fileSize" : "3 KB",
  "created" : "18/Jun/20 3:34 PM",
  "creator" : "admin"
} ]
2020-06-23 17:
15
37:
18
28,
636
857 DEBUG [groovy.script]: Updated 
asset.cost
by: 
1200
admin
2020-06-23 17:
15
37:
18
28,
636
857 DEBUG [groovy.script]: Updated 
asset.invoiceNumber
at: 
my
Tue 
invoice 10387 2020-06-23 17:15:18,636 DEBUG [groovy.script]: ----------------------------------------------------
Jun 23 17:24:24 MSK 2020
2020-06-23 17:37:28,857 DEBUG [groovy.script]: Created by: admin
2020-06-23 17:
15
37:
18
28,
636
857 DEBUG [groovy.script]: Created at: Wed Jun 10 14:37:31 MSK 2020
2020-
------------------
06-23 17:37:28,857 DEBUG [groovy.script]: --- Attributes ----------------------
2020-06-
---------
23 17:37:28,857 DEBUG [groovy.script]: all - Asset list: 
2020-06-23 17:
15
37:
18
28,
636
857 DEBUG [groovy.script]:
Asset
        - id:183, name:admin 
10495
çalışanı
2020-06-23 17:
15
37:
18
28,
636
857 DEBUG [groovy.script]:     
Asset
  
name:
 
all two - clone 4
- id:221, name:Asset Name 0001
2020-06-23 17:
15
37:
18
28,
636
857 DEBUG [groovy.script]:
Asset
 all - asset list by type
id
: 
36

2020-06-23 17:
15
37:
18
28,
636
857 DEBUG [groovy.script]:
Asset type
        - id:10379, name:blue 
all
pc
types
2020-06-23 17:
15
37:
18
28,
636
857 DEBUG [groovy.script]:      
Asset
 
type
 
scheme
- id:138, name:Emp 
2
001
2020-06-23 17:
15
37:
18
28,
637
857 DEBUG [groovy.script]: 
Asset
all 
type
- 
scheme name
checkbox: 
HR

Assets
2020-06-23 17:
15
37:
18
28,
637
857 DEBUG [groovy.script]: 
Attachments
 
json
 
string:
 
[
 
{
   
"originalFileName"
- 
: "Marla_Singer_2.jpg", "serverFileName" : "10163_48190_1591789628314.jpg", "fileSize" : "27 KB", "created" : "10/Jun/20 2:47 PM", "creator" : "admin" }, { "originalFileName" : "xps13-2.jpg", "serverFileName" : "23815_70783_1591870901186.jpg", "fileSize" : "42 KB", "created" : "11/Jun/20 1:21 PM", "creator" : "admin" }, { "originalFileName" : "bobswift example2.groovy", "serverFileName" : "06040_73967_1592483691399.groovy", "fileSize" : "3 KB", "created" : "18/Jun/20 3:34 PM", "creator" : "admin" } ]
ada
2020-06-23 17:37:28,857 DEBUG [groovy.script]:        - bal
2020-06-23 17:37:28,857 DEBUG [groovy.script]: all - date picker: 2019-12-26
2020-06-23 17:37:28,857 DEBUG [groovy.script]: all - date time picker: 2019-12-31T14:39
2020-06-23 17:37:28,857 DEBUG [groovy.script]: all - dropdown list: cam
2020-06-23 17:37:28,857 DEBUG [groovy.script]: all - IP: 192.168.1.1
2020-06-23 17:37:28,857 DEBUG [groovy.script]: all - IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
2020-06-23 17:37:28,857 DEBUG [groovy.script]: All - Jira user: 
2020-06-23 17:
15
37:
18
28,
637
857 DEBUG [groovy.script]:      
Updated
- 
by
name: 
admin
tyler
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: 
Updated
  
at:
 
Mon
 
Jun
 
22
- 
16:41
key:
41
 
MSK 2020
tyler
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:
Created by: admin
      - display name: Tyler Durden
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:  
Created
  
at:
 
Wed
 
Jun
- 
10
email 
14:37
address:
31
 
MSK
tyler@example.com
2020
2020
-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:      
-
-
-
 
Attributes ----------------------
active: true
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: all - jira 
Asset
single 
list
user: 
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:      
- 
id:183,
name:
admin
 
çalışanı
agrant-sd-demo
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:
      
- 
id
key:
221, name:Asset Name 0001
 agrant-sd-demo
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: 
all
   
-
 
asset
 
list
- 
by
display 
type
name: Alana Grant
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:
      
- 
id:10379, name:blue pc
email address: agrant-sd-demo@example.com
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:
      
- 
id
active:
138, name:Emp 001
 true
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: all - jira multiple 
checkbox
users: 
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:      
----- 
ada

2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:      - name: mdavis-sd-demo
bal
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:     
all
 - 
date picker
key: 
2019
mdavis-
12
sd-
26
demo
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: 
all
 
-
 
date
 
time
 
picker:
 
2019-12-31T14:39
- display name: Mitch Davis
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: 
all
     - 
dropdown
email 
list
address: 
cam (Display value=cam)
mdavis-sd-demo@example.com
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:   
all
 
-
 
IP: 192.168.1.1 (Display value=192.168.1.1)
 - active: true
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: 
all
  
-
 
IPv6:
 
2001:0db8:85a3:0000:0000:8a2e:0370:7334 (Display value=2001:0db8:85a3:0000:0000:8a2e:0370:7334)
 ----- 
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: 
All
 
-
 
Jira
 
user:
 
admin
 
(Display value=admin (admin))
- name: assetuser
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: 
all
 
-
 
jira
 
single
 
user:
 
agrant-sd
-
demo
 
(Display value=Alana Grant (agrant-sd-demo))
key: assetuser
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:     
all
 - display 
jira
name: 
multiple
Asset 
users:
User 1
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:      - email 
-
address: 
mdavis-sd-demo
asset-user@example.com
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]:      - active: 
- assetuser
true
2020-06-23 17:
15
37:
18
28,
637
858 DEBUG [groovy.script]: all - listbox: 
lahmacun (Display value=
lahmacun
)

2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]: all - listbox multiple: 
2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]:        - mavi
2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]:        - kırmızı
2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]: all - number long:
120 (Display
 
value=
120
)

2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]: all - number float:
150 (Display
 
value=
150
)

2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]: all - radio:
paranoid (Display
 
value=
paranoid
)

2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]: all - text: sample text here
(Display

value=sample text here)
2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]
: all - text area
: 
more
all 
sample
- 
text 
here (Display value=
area: more sample 
text here
)

2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]: all - url: https://jira-test.snapbytes.com/
(Display value=<a style="font-size: 100%"

href="https://jira-test.snapbytes.com/" target="_blank">https://jira-test.snapbytes.com/</a>)
2020-06-23 17:
15
37:
18
28,
638
858 DEBUG [groovy.script]: --- System Fields ----------------------
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.quantity: 100
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.
reservedFor
costCurrency: 
tyler
USD
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.
costCurrency
reservedFor: 
USD
tyler
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.assetTag: asset tag
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.owner: agrant-sd-demo
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.serialNumber: my serial 101
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.status: 1 (Display value: In stock)
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.installDate: 2020-06-10
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.managedBy: mdavis-sd-demo
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.substatus: 2 (Display value: Reserved)
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.assignee: JIRAUSER10303
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.belongsToGroup: [ "jira-servicedesk-users", "jira-software-users" ]
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.
cost
location: 
1200
2
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.
location
cost: 
2
1200
2020-06-23 17:
15
37:
18
28,
638
859 DEBUG [groovy.script]: asset.invoiceNumber: my invoice 10387