- Introduction
- About
- Get started
- Migration to Cloud
- Bundled Fields
- Bundled Fields Overview
- Adding Bundled Fields
- Bundled Fields Configuration
- Format and validation
- Using Bundled Fields
- Advanced settings
- Bundled Fields Searcher
- Java API (ScriptRunner)
- Data Sources
- Email notifications
- Bundled Fields v.6.8.x - 6.9.x
- Bundled Fields v.6.7.x
- Dynamic Forms
- Dynamic Forms
- Supported fields
- Visibility
- Request Types visibility
- Fields visibility
- Customer Portal visibility
- Options visibility
- Requirements visibility
- SLAs visibility
- Java API
- Multilevel Structure
- Configuration
- Using a multilevel structure on the Customer Portal
- User Synchronization
- Organizations and Groups Synchronization
- Issue View
- Issue View
- Add user's IP address post function
- Restart SLA post function
- Update SLA to date post function
- Customer Portal
- Links
- Export list
- Split column
- Request details view
- Additional fields
- Additional options
- Compatibility
- Configuration Manager
Bundled Fields (version 6.7.x and earlier)
This section provides information on configuring Bundled Fields in Extension v.6.7.x and earlier.
A Bundled Fields feature allows to bundle all information into one custom field. This custom field is displayed as additional form.
- Bundled field feature supports four types of custom fields:
text fields (single and multi-line), select fields, date pickers and checkboxes. - Remember to add the field to the issue screen and to the request type.
- To check your settings, go to:
Project Settings > Request Types > Edit fields > Add a field.
For more information on adding a custom field, see official Atlassian documentation.
Add Bundled Field
Steps
To add a bundled field:
- Go to Jira Administration > Add-ons.
- Select Bundled Fields from the menu in the Extension for Jira Service Management section.
- Click Create Custom Field.
- Click Add custom field.
The Select a Field Type dialog box appears. - Select Deviniti [Extension] - Bundled Fields from the list in the Advanced section.
- Click Next.
- Configure Deviniti [Extension] - Bundled Field’ Field dialog box appears.
- Configure the selection criteria (Name and/or Description).
- Click Create.
- Select the checkboxes of the screens on which this custom field will be displayed.
- Click Update.
Result
A new custom field Deviniti [Extension] - Bundled Fields is added.
Configure Bundled Field
To configure a Bundled Field:
-
Go to Jira Administration > Add-ons.
-
Select Bundled Fields from the menu in the Extension for Jira Service Management section.
-
Select a custom field from the list (below the plus icon) which you want to configure.
NoteThis list contains all Deviniti [Extension] - Bundled Field custom fields which are added to Jira. -
Configure the following:
- Context: Select in which context of custom field configuration will be set. Each custom field’s context can have own Bundled field’s configuration.
- Alignment: Select how to compose fields: vertical or horizontal.
-
Click Add new row.
-
Configure the following:
- Field Name: Type name of nested field.
- Type: Select type of custom field: text, select, checkbox, multi text or date picker.
Note
In case of select and checkbox new option is added by clicking New option.
- Required: Set the state of switch to on to make nested field required.
- Show Label: Set the state of switch to on to show label of nested field (Field Name).
Tip- Click Copy to copy nested field with configuration and create new rows quicker.
- Use drag-and-drop to re-order nested fields in the list.
- Option for deleting configuration is on the right side of the table. Click the trash icon to remove selected fields.
-
In Layout settings section switch Turn on Edit mode to on.
Now you can change field’s size and location. -
Click Save Layout.
Result
A new layout configuration is saved.
If you don’t want to save layout settings, click Discard changes on the right side.
Details
Steps
To configure Bundled Fields details:
- Click on Details on the right side.
- Configure the following:
- Help: Type text which will help user to fill fields.
- Default number of rows: Choose default number of bundled field rows.
For example, if you select five rows, a bundled field will be displayed five times, in five rows.
NoteYou can select maximum 25 rows. If you select 0 as a Default number of rows, your Bundled field will generate as an empty state. - Allow user to add new rows during filling the form: Set the state of switch to on to allow user to add new rows during filling the form.
- Show label only for the first row (in horizontal alignment).
- Click Save.
Result
Bundled Fields details are saved.
Using Bundled Fields
Steps
To check how bundled fields work:
- Go to Jira Administration > Projects.
- Select project from the Project list.
Welcome guide screen is displayed. - Go to Customer channels.
- Click Visit the portal or copy and paste a link into a browser address bar.
- Create a request.
- A screen with the request is displayed.
- Fill in the request details, including the custom field: Deviniti [Extension] - Bundled Field (for example: Address).
NoteIf you allow user to add new rows during filling the form, the + icon appears below the bundled field.
- Click Create.
Result
The request with Deviniti [Extension] - Bundled Field (for example: Address) is created.
Horizontal and vertical alignment
You can configure Bundled fields in horizontal and vertical positions in the request detail view and issue view.
Below you can see the example of Bundled field in horizontal alignment in the request detail view.
Bundled Fields Searcher
Extension for Jira Service Management provides a dedicated searcher. It allows to search issues in Jira which contains a Bundled Fields custom field.
There are two options: issue in bundledFieldsEx("", "")
(two arguments) and issue in bundledFieldsEx("", "", "")
(three arguments).
issue in bundledFieldsEx("", "")
Syntax with details | Example |
---|---|
issue in bundledFieldsEx(“customfield_name”, “subfield_value”) | issue in bundledFieldsEx(“Address”, “Poland”) It returns all issues which contain Address custom field where one value is Poland. |
issue in bundledFieldsEx(“Address”, “”) It returns all issues which contain Address custom field where min. one value is empty. | |
issue in bundledFieldsEx(“customfield_id”, “subfield_value”) | issue in bundledFieldsEx(“customfield_10301”, “Poland”) |
It returns all issues which contain custom field with ID = 10301 (in this case: Address) where one value is Poland. | |
issue in bundledFieldsEx(“customfield_10301”, “”) | |
It returns all issues which contain custom field with ID = 10301 (in this case: Address) where min. one value is empty. | |
issue in bundledFieldsEx(“id”, “subfield_value”) | issue in bundledFieldsEx(“10301”, “Poland”) |
It returns all issues which contain custom field with ID = 10301 (in this case: Address) where one value is Poland. | |
issue in bundledFieldsEx(“10301”, “”) | |
It returns all issues which contain custom field with ID = 10301 (in this case: Address) where min. one value is empty. |
issue in bundledFieldsEx("", "", "")
Syntax with details | Example |
---|---|
issue in bundledFieldsEx(“customfield_name”, “subfield_name”, “subfield_value”) | issue in bundledFieldsEx(“Address”, “Country”, “Poland”) |
It returns all issues which contain Address custom field with Country subfield (which value is Poland). | |
issue in bundledFieldsEx(“customfield_id”, “subfield_name”, “subfield_value”) | issue in bundledFieldsEx(“customfield_10301”, “Country”, “Poland”) |
It returns all issues which contain custom field with ID = 10301 (in this case: Address) with Country subfield (which value is Poland). | |
issue in bundledFieldsEx(“id”, “subfield_name”, “subfield_value”) | issue in bundledFieldsEx(“10301”, “Country”, “Poland”) |
It returns all issues which contain custom field with ID = 10301 (in this case: Address) with Country subfield (which value is Poland). |
To find an ID of Bundled Field custom field, go to the Issues > Custom Fields. Select custom field, click Edit and check URL address.
Example: http://192.168.0.84:8082/secure/admin/EditCustomField!default.jspa?id=10301
If you don’t see issues that contain Bundled Field custom field, go to the Issues > Custom Fields. Select custom field, click Edit and check Search Template. Bundled Fields Searcher should be set.
Use data from Bundled Fields in Script Runner
This page provides information on using saved data in the Script Runner app for Extension v.6.7.x and earlier.
Extension for Jira Service Management app allows to use data from Bundled Fields in the Script Runner, or in the external app.
We’ve tested all methods in this chapter and made sure that they work in the form provided in the examples. The support we provide doesn’t include verifying custom scripts. In case of any issues with customized code we recommend checking out the ScriptRunner documentation, too.
The following .JSON file shows all field types available in Bundled Fields.
{
"baseGroupId": {
"fields": [
{
"id": "1a66be6f-b9a6-4bb0-9780-7113f53e4ce6",
"name": "text fields",
"type": "text",
"required": true,
"showLabel": true,
"options": [],
"value": "test"
},
{
"id": "df42c0c8-0f36-4a6f-b7c9-1030d12e8621",
"name": "select field",
"type": "select",
"required": true,
"showLabel": true,
"options": [
{ "id": "48c432d0-93f2-46c9-959a-b19d56715b8f", "name": "option 1" },
{ "id": "c891fc2c-2827-437f-81d2-d47ea8da4d29", "name": "option 2" },
{ "id": "eb9ca7fc-ede1-47c8-9a3c-63823e9e1194", "name": "option 3" }
],
"value": "c891fc2c-2827-437f-81d2-d47ea8da4d29"
},
{
"id": "8655d759-d16a-4d54-b414-bb9391b42c2e",
"name": "checkbox",
"type": "checkbox",
"required": true,
"showLabel": true,
"options": [
{ "id": "1ae64d17-815b-4667-b26d-b1855ead1673", "name": "check 1" },
{ "id": "ff303f03-f7b7-44fc-81fd-d0329d7deaaa", "name": "check 2" },
{ "id": "9b2d710d-0505-46b4-b35f-95c1b3d211a3", "name": "check 3" }
],
"value": "1ae64d17-815b-4667-b26d-b1855ead1673,ff303f03-f7b7-44fc-81fd-d0329d7deaaa"
},
{
"id": "79f1c607-8afe-489a-81f4-a13cba9b499e",
"name": "multitext field",
"type": "textarea",
"required": true,
"showLabel": true,
"options": [],
"value": "test multitext"
},
{
"id": "1e1a5b39-c0c8-4426-8b40-33a7a99dacfc",
"name": "date field",
"type": "date",
"required": true,
"showLabel": true,
"options": [],
"value": "2018-11-20"
}
],
"id": "baseGroupId"
}
}
Get Bundled Field’s value
Variable (String) | Description | Example |
---|---|---|
issueKey | Key of issue where bundled field is placed | WORK-27 |
bundledFieldId | ID of source bundled field | customfield_10300 |
fieldName | Name of the field in column in bundled field | select field |
Integer row | Number of row in bundled field | 0 |
The following example shows how to get Bundled Field’s value.
import com.atlassian.jira.component.ComponentAccessor
import groovy.json.JsonSlurper
import org.apache.log4j.Logger
import org.apache.log4j.Level
def log = Logger.getLogger("com.onresolve.scriptrunner.runner.ScriptRunnerImpl")
log.setLevel(Level.DEBUG)
//key of issue, where the bundledfields value is
String issueKey = 'WORK-27'
//id of bundledfield where we are looking for value
String bundledFieldId= "customfield_10300"
//field column in bundledfield
String fieldName = "select field"
//row in bundledfield
Integer row = 0
def issueManager = ComponentAccessor.getIssueManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cfBundledFields = customFieldManager.getCustomFieldObject(bundledFieldId)
def issue = issueManager.getIssueObject(issueKey)
String cfValue = issue.getCustomFieldValue(cfBundledFields)
Object jsonValue = new JsonSlurper().parseText(cfValue)
////Retrieve a value of requested row and field name
List fields = getFieldsForRow(row,(Map) jsonValue)
Map field = getFieldByName(fieldName,fields)
def value = getFieldValue(field)
log.info("my subField ${fieldName} value is ${value}")
value
def String getFieldValue(Map field){
def type = field.type
if(type == 'select' || type == 'checkbox'){
return getOptionValue(field)
}
return field.value
}
def String getOptionValue(Map field) {
List<Map> allOptions = (List<Map>) field.options
String val = field.value
String[] selectedIds = val.split(',')
List<Map> selectedOptions = allOptions.findAll { it.id in selectedIds }
return selectedOptions.name.join(', ')
}
def Map getFieldByName(fieldName, List<Map> fields){
return fields.find{it.name == fieldName}
}
def List getFieldsForRow(row,Map json){
List fields = null
int i=0
json.each{k,v ->
if(i == row){
fields = ((Map) v).get("fields")
}
i++
}
return fields
}
Copy Bundled Field’s value
Variable (String) | Description | Example |
---|---|---|
issueFromKey | Key of issue from which field’s value will be copied | WORK-27 |
issueToKey | Key of issue to which field’s value will be copied | WORK-28 |
cfFromId | ID of source custom field | customfield_10300 |
cfToId | ID of target custom field | customfield_10403 |
The following example shows how to copy Bundled Field’s value to another field with the same configuration.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import com.atlassian.jira.issue.ModifiedValue
String issueFromKey = 'WORK-27'
String issueToKey = 'WORK-28'
String cfFromId = "customfield_10300" //bundledfield id copy from
String cfToId = "customfield_10403" //bundledfield id copy to(copy to field must have the same configuration)
def issueManager = ComponentAccessor.getIssueManager()
def issueFrom = issueManager.getIssueObject(issueFromKey)
def issueTo = issueManager.getIssueObject(issueToKey)
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cfFrom = customFieldManager.getCustomFieldObject(cfFromId)
def cfTo = customFieldManager.getCustomFieldObject(cfToId)
def cfValueFrom = issueFrom.getCustomFieldValue(cfFrom)
def cfValueTo = issueTo.getCustomFieldValue(cfTo)
if (cfFrom && cfTo) {
def changeHolder = new DefaultIssueChangeHolder()
cfTo.updateValue(null, issueTo, new ModifiedValue(cfValueTo, cfValueFrom),changeHolder)
}
issueTo.getCustomFieldValue(cfTo) != null
Need help?
If you can’t find the answer you need in our documentation, raise a support request*.
- Include as much information as possible to help our support team resolve your issue faster.