Definition
Available for Live fields Snapshot fields
In this view, you can configure the query and the template that Elements Connect shall execute when a field is edited.
This is the default configuration used when a field is displayed or searched if the specific configuration have not been set.
How it works
Let's use an example to illustrate how it works.
Configuration
Datasource
We'll use a SQL database as data source, but the principle is the same with other types of data sources.
In our database, we have this table:
customer_list
|
id |
name |
address |
zipcode |
country |
|---|---|---|---|---|
|
1 |
John Farnsworth |
41 El Alto Parkway |
56883 |
India |
|
2 |
Erika Pena |
898 Jining Lane |
23444 |
Finland |
|
3 |
Mary Smith |
1913 Hanoi Way |
23000 |
Japan |
|
4 |
Patricia Johnson |
1121 Loja Avenue |
34980 |
United States |
|
5 |
Linda Williams |
692 Joliet Street |
31300 |
Greece |
|
etc.. this table contains ~ 600 entries |
||||
Field configuration
Runtime
When a field is edited, Elements Connect:
-
Executes the query and get this result set:
id
customer
country
1
John Farnsworth
India
2
Erika Pena
Finland
3
Mary Smith
Japan
4
Patricia Johnson
United States
5
Linda Williams
Greece
etc...
-
Applies the template on every row of the result set, the result is:
key
display value
1
John Farnsworth (India)
2
Erika Pena (Finland)
3
Mary Smith (Japan)
4
Patricia Johnson (United States)
5
Linda Williams (Greece)
etc...
-
Sends this result to the field editor, where the "display value" is displayed to the user
-
When a value is selected in an issue, Elements Connect stores the "key" column in the
customfieldvaluetable of the Jira database:
SELECT issue, customfield, textvalue
FROM customfieldvalue
WHERE customfield = 10234
|
issue |
customfield |
textvalue |
|---|---|---|
|
11012 |
10234 |
|
Configuration
The configuration is done in two steps (see Field configuration screen)
-
Query configuration
-
Editor component configuration
The template defined in the editor component configuration will be applied on all the results returned by the query.
This configuration is used when a field is edited, whatever it's empty or not, in context such as:
-
Create issue screen
-
Edit issue screen
-
Request creation from the Jira Service Management customer portal
-
Bulk edit
-
Inline editing of a field (from the Issue view or the Agile board)
-
Transition screens
Velocity variables
Any velocity variable can be used in the Editor query, however some of them might be empty depending on the context:
-
issue.idonly has a value if the issue exists - it's empty on the Create issue and Request creation screens -
currentCustomfieldValuewon't have a value if the field is empty -
on the Jira Service Management portals, hidden fields can be used in the query.