Overview

You can only use JIRA's built in custom fields in JIRA Service Desk, the JIRA Issue Collector, Confluence's "Create Issue" dialogue, etc. If you would like to use a custom field from an add-on that retrieves its options from an external database, you're out of luck. You can not use any custom fields from add-ons.


That's where the Custom Filed Option Synchroniser add-on comes into play. Use any standard multi-value custom field, such as checkboxes, radio buttons, selects, etc. in the JIRA Service Desk form as you normally would. But instead of having to manually update the field options whenever the options in the third party database change, the Custom Field Option Synchroniser will update those options for you automatically.

Use Case

Your company uses the following systems:

  • JIRA Service Desk: If employees have a problem with the IT infrastructure, they open an issue to get support.
  • A CMDB: The whole IT infrastructure is managed in that system.

When employees have a problem with their computer they can get support through JIRA Service Desk. When opening an issue, the employees have to select the ID of their computer from a select custom field. Because there are hundreds of computer IDs and they do change frequently, this task is automated with the Custom Field Option Synchroniser add-on.

Use Case

Configure a Datasource

Before you can set up a synchronisation for a custom field, you first need to configure a datasource for your desired database. Find more information about configuring a datasource in Configure a Datasource.

Because the queries the add-on is able to execute are read-only, the database user you configure in the datasource only needs read access to the database.

Setup Synchronisation

To manage synchronisations click on "Option Synchronisations" in the left sidebar of the "Add-ons" tab in the JIRA administration. You need to have administration permissions to access this page.

You can now either add a new synchronisation or edit an existing one. The following information needs to be configured:

SettingRequriedDescription
Custom Field(tick)

Choose the custom field you want to sync the options with. Any of the following multi-value custom fields are supported:

  • Checkboxes

  • Radio Buttons

  • Select List (single choice)

  • Select List (multiple choices)

  • Select List (cascading)

Once you've configured a synchronisation, the custom field can't be changed any more.

Config Scheme(tick)

Choose the field configuration scheme you want to sync the options with.

Once you've configured a synchronisation, the field configuration scheme can't be changed any more.

Datasource(tick)

Datasource of the database you want to synchronise the options with.

This is the value of the attribute "name" from the "Resource" element in JIRA's server.xml file. It usually starts with "jdbc/...".

SQL Statement(tick)

SQL statement to query the database for selecting the data you want to use as options.

The query needs to return the following columns:

  • id => unique identifier of the value
  • value => the actual value to later display as option in custom field in JIRA
Cron Expression(tick)

Cron expression to schedule the synchronisation. Default: 0 0 1 * * ? (every day at 1am)

Find more information about Cron Expressions here

Error Mail Address(error)Email address to send error report if any error occurs during synchronisation.

 

What happens when

  • a new value has been added in the source database?
    The new value will be available as new option after the next synchronisation.
  • an existing value has been changed in the source database?
    The add-on will update the value during the next synchronisation.
  • an existing value has been removed in the source database?
    If the option is in use by any issue, it will be disabled during the next synchronisation. Otherwise, the option will be removed from the custom field.
  • a user adds a new option for the custom field in JIRA manually?
    If the option is used in an issue, it will be disabled during the next synchronisation. Otherwise, the option will be removed from the custom field.
  • a user renames an existing option of the custom field in JIRA manually?
    The add-on will update the option to the value from the datasource again during the next synchronisation.
  • a user disables or removes an existing option of the custom field in JIRA manually?
    The missing option will be enabled or re-added again during the next synchronisation.
  • a user removes a synchronisation for a custom field?
    Even though the synchronisation will be removed, the custom field will keep all the options.
  • a user removes a custom field with a synchronisation configured?
    The custom field and all related data including the synchronisation will be removed from JIRA.

FAQs

Related articles

Support

Comments  (0)

Attachments  (11)

Add Attachment
  File Modified
PNG File plugin-logo.png 05. Dec. 2014 by remo.siegwart@bitvoodoo.ch
PNG File screenshot-1.png 05. Dec. 2014 by remo.siegwart@bitvoodoo.ch
PNG File screenshot-2.png 05. Dec. 2014 by remo.siegwart@bitvoodoo.ch
PNG File JSD Form.png 05. Dec. 2014 by thomas.wendel@bitvoodoo.ch
PNG File JSD Logo.png 05. Dec. 2014 by thomas.wendel@bitvoodoo.ch
PNG File JIRA Logo.png 05. Dec. 2014 by thomas.wendel@bitvoodoo.ch
PNG File JIRA Custom Field Configuration.png 05. Dec. 2014 by thomas.wendel@bitvoodoo.ch
PNG File Plus.png 05. Dec. 2014 by thomas.wendel@bitvoodoo.ch
PNG File Custom Field Option Synchroniser 140.png 19. Jul. 2017 by Robin Stohler
File Use Case GLIFFY DIAGRAM 30. Oct. 2017 by Robin Stohler
PNG File Use Case.png GLIFFY IMAGE 30. Oct. 2017 by Robin Stohler