Skip to main content
Skip table of contents

Edit view configuration



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

idnameaddresszipcodecountry
1John Farnsworth

41 El Alto Parkway

56883

India
2Erika Pena898 Jining Lane23444Finland
3Mary Smith1913 Hanoi Way23000Japan
4Patricia Johnson1121 Loja Avenue34980United States
5Linda Williams692 Joliet Street31300Greece
etc.. this table contains ~ 600 entries

Field configuration


Runtime

When a field is edited, Elements Connect:

  1. Executes the query and get this result set:

    idcustomercountry
    1John FarnsworthIndia
    2Erika PenaFinland
    3Mary SmithJapan
    4Patricia JohnsonUnited States
    5Linda WilliamsGreece
    etc...
  2. Applies the template on every row of the result set, the result is:

    keydisplay value
    1John Farnsworth (India)
    2Erika Pena (Finland)
    3Mary Smith (Japan)
    4Patricia Johnson (United States)
    5Linda Williams (Greece)
    etc...
  3. Sends this result to the field editor, where the "display value" is displayed to the user


  4. When a value is selected in an issue, Elements Connect stores the "key" column in the customfieldvalue  table of the Jira database:

SQL
SELECT issue, customfield, textvalue
FROM customfieldvalue
WHERE customfield = 10234
issuecustomfieldtextvalue
1101210234{"keys":["3"]} 



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.id only has a value if the issue exists - it's empty on the Create issue and Request creation screens
  • currentCustomfieldValue won't have a value if the field is empty
  • on the Jira Service Management portals, hidden fields can be used in the query.




JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.