Automatically translate field values

Automatically translate field values

Goal

Automatically translate field values into a target language.

Goal

Automatically translate field values into a target language.

Scenario

One of your Development teams is located in Poland, and your Project Manager is located in Canada. You want to translate field values into a specific language - Polish in this example - to improve communication between teams and assist in faster issue resolution.

Components

Script action

Baseline

  • When a user creates or edits an issue the Summary and Description fields will be translated.


Requirements

  • Jira Administrator login

  • Live Fields for Jira Cloud

Create the live fields configuration

  1. For Screens, select Issue create view and Issue view. This will guarantee that the selected fields are always translated even if they are updated after the issue is created.

  2. Click Projects, and then click Select projects in the right-hand panel.

  3. Select the project or projects to which your configuration should be applied.

  4. Click Issue types, and then click Select issue types in the right-hand panel.

  5. Select the issue types to which your configuration should be applied (for example, Story and Task).

  6. Under THEN, click Add Scripted action, and then click Start scripting in the right-hand panel.

  7. Enter the following script:

useCase-PriorityOptionsIssueTypes.png
Figure 1 - Select issue types

 

// Translate the "Summary" and "Description" fields asynchronously // using the `translate` function, then update the fields with the translated values. //Fetch the user's locale value to use as a dynamic value for fromLanguage parameter const context = await getContext(); const userLocale = context.locale; // Fetch corrected values for "Summary" and "Description" simultaneously const [translatedSummary, translatedDescription] = await Promise.all([ translate("summary", userLocale, "Polish"), // Translate the content of the "Summary" field translate("description", userLocale, "Polish") // Translate the content of the "Description" field ]); // Update the "Summary" field if translations were made if (translatedSummary) { getFieldById("summary").setValue(translatedSummary); } // Update the "Description" field if translations were made if (translatedDescription) { getFieldById("description").setValue(translatedDescription); }
  1. Click Save.

  2. Check the box for On change to set the configuration to trigger only when the issue is updated.

  3. Click Save.

Enable and test your configuration

Your configuration is now complete. Verify that the configuration is enabled on the Live Fields administration page. Once it’s enabled, you can test it by creating a new issue; verify that the Summary and Description fields are translated automatically - even at the time of entry for each field.

Congratulations!

You can now provide primary information about an issue in your team members' primary language!

useCase-TranslateSummaryDescription.png
Figure 2 - Script editor

 

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.