Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-93701

3rd party app validators and conditions for rich text custom fields may not work consistently with different versions of Jira APIs and Transition Screens

XMLWordPrintable

      Issue Summary

      User is unable to transition issues when using a  3rd party apps workflow conditions or validators for rich test custom fields.

      Steps to Reproduce

      1. Install a 3rd party app (e.g. script runner) for the instance
      2. Create a custom multi-line text custom field
      3. Add a Validator or Condition from this app for this field using Jira expression on a transition
        e.g issue.customfield_<ID>.replace('\n','Text')
      4. Perform a transition via the new issue transition experience
      5. Try on the old issue transition - we can create an issue

       

      Root cause:

      The new transition experience utilises the ADF (Atlassian Document Format), while various APIs rely on older approaches that depend on Wiki Markup for multi-line text fields. Customers may have crafted Jira Expressions based on Wiki Markup for these conditions and validators, which cannot parse text from ADF representations due to these format changes. Consequently, validators and conditions fail, causing transitions to be unavailable or validations to return incorrect results. This results in the Jira Expression framework used by ScriptRunner and other apps not functioning as intended.

      Expected Results

      The issue can be transitioned.

      Actual Results

      We can not perform the transition.

      Workaround

      Use Single line text field instead OR make modifications to their workflow validators set up on multi-line text fields. 

      These modifications should ideally cater for fields being in either a wiki format or a ADF format when being processed.

      For example, the following snippet will supply a function called plainText that can be used to transform either ADF or RichText fields into plainText.

      let plainTextValue = value => typeof value == 'Map' ? new RichText(value).plainText : typeof value == 'RichText' ? value.plainText : value ;
      plainTextValue(issue.customfield_10000) == "Some text" || plainTextValue(issue.description) == "Some text"
      

      For more detail, you can review:

      Users on the old issue transition experience can update their existing workflow validators and test these changes by enabling the switch to the New issue transition experience, found under Settings > Personal Jira Settings.

              Unassigned Unassigned
              mcaroly@atlassian.com Marcel Caroly
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: