Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-1025

If a custom field is translated to a language other than English, smart values that refer to this field might return an empty value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.2.1
    • 8.0.0, 9.1.0, 9.2.0
    • Smart-values
    • Severity 3 - Minor

      Issue Summary

      If a custom field (such as "Story Points") is translated to a language other than English, smart values that refer to this field might return an empty value depending on the rule actor.

      Steps to replicate

      1. Go to ⚙ > Issues > Custom Fields
        • Search for the "Story Points" Custom Field
        • Next to this field, click on ... > Translate Details
        • Add a German Translation for this field, for example "story-punkte"
      2. Create a new automation rule
        • To be trigger on the Field Update, monitoring the "Story Points" Field
        • That uses 2 log actions with the messages below:
          • Log action 1
            Story points using issue smart value: {{issue.Story Points}}
            
          • Log action 2
            Story points using triggerIssue smart value: {{triggerIssue.Story Points}}
            
        • That uses a JQL branch of type Epic
        • That uses the lookupIssue with the JQL below
          "epic link"={{issue.key}}
          
        • That uses a log action with the message below:
          Story points using Lookup Issues smart value: {{lookupIssues.Story Points}}
          
      3. Trigger the rule by updating the "Story Points" field to a non empty value of a Story issue which is part of an Epic
      4. Check the Audit logs of the rule

      Screenshot showing the automation rule:

      Expected behavior

      The smart values used in the 3 log actions should show a value:

      {{issue.Story Points}}
      {{triggerIssue.Story Points}}
      {{lookupIssues.Story Points}}
      

      Actual behavior

      All the smart values are returning something empty

      {{issue.Story Points}}
      {{triggerIssue.Story Points}}
      {{lookupIssues.Story Points}}
      

      Workaround

      Workaround 1 - Recommended

      Change the rule actor to a user that has their language preference set to English.

      Workaround 2 - Less recommended (does not work with the LookupIssue Smart value)

      This workaround only works with the issue and triggerIssue smart value, but not with the LookupIssue Smart Value).

      If you cannot change the rule actor to another user, then what you can do is use the customfield_XXXX property instead of the Field Name, XXXXX being the custom field ID identified by following the instructions from this KB article:

      {{issue.customfield_XXXXX}}
      {{triggerIssue.customfield_XXXXX}}
      

        1. ActualResults.png
          ActualResults.png
          281 kB
        2. AutomationRule.png
          AutomationRule.png
          85 kB
        3. CustomFieldTranslation.png
          CustomFieldTranslation.png
          82 kB
        4. ExpectedResults.png
          ExpectedResults.png
          277 kB

              9e460d4f5ba4 Shreyans Jain
              jrey Julien Rey
              Votes:
              6 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: