Sync Jira field options from a function call

Recipe ToolsWorkatoProject ManagementMarketingDatabaseUtilities

What it does

When someone calls this automation with a field value ID, it updates or creates a Jira field option and then sorts all options alphabetically. The automation handles fields with hundreds of values by fetching them in batches.

Who it's for

IT teams who manage Jira field configurations and need to add or edit custom field options programmatically.

How teams use this

Add a new Jira field option

Call the automation with a field name and no ID to create a new option in Jira. The option is added and sorted with the rest automatically.

Edit an existing field option

Provide a field value ID to update the option name or toggle whether it is disabled in Jira. The full list is re-sorted after the change.

Manage large custom fields

Use this automation on Jira fields with hundreds of options. Set the batch size to handle fields over 500 values and keep them sorted without hitting API limits.

Sync options from another system

Call this automation from another app to add or update Jira field options without manual entry. The function accepts the data and handles the rest.

How it works

  1. Receive the field option request. A function call arrives with the field value ID, name, and disabled status so the automation knows whether to edit an existing option or add a new one.
  2. Update or create the field option. If a field value ID is present, the automation updates that Jira option and toggles its disabled flag. If not, it adds a new option with the provided name.
  3. Fetch all field options in batches. The automation loops through Jira to retrieve all options for the field, 100 at a time, because custom fields often have 500 or more values.
  4. Sort options alphabetically. Once all options are collected, the automation sorts them in alphabetical order so the field displays consistently in Jira.