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

ScriptRunner/JMWE/other apps regex validator for certain rich-text custom fields fails on the new Global Issue Create modal

    XMLWordPrintable

Details

    Description

      Update on October 20, 2022

      Hello people,

      As communicated previously on this page and this community post, users will have to rewrite their workflow validators for the create transition that use the Multi-Line Text custom fields: Multi-Line Text Field, Message Edit Field. Why? Atlassian is working towards moving away from Wiki Markup in favour of ADF (Atlassian Document Format). So adding support for Wiki Markup in Jira Expressions Engine to handle automatic conversion from PlainText would again be a temporary fix, only to be removed again shortly.

      We understand the effort involved in users having to rewrite their validators but this would go a long way in maintaining a uniform experience for customers having to write validators in the future using a single syntax.

      Thank you,
      Arbaaz Gowher
      Product Manager, Jira Platform

      Issue Summary

      User is unable to create issues on the new Global Issue Create modal using ScriptRunner workflow validator for multi-line text field

      Steps to Reproduce

      1. Install script runner for the instance
      2. Create a custom multi-line text custom field
      3. Add "Script Runner" Validator for this field using Jira expression on the create transition
        e.g issue.customfield_<ID>.replace('\n','Text')
      4. Open the new Global Issue Create modal and fill in some values and click on submit - we will get a validation error
      5. Try on the old issue create modal - we can create an issue

      Root Cause

      This happens for the Multi-Line Text custom fields: Multi-Line Text Field, Message Edit Field due to the following reason:

      REST v3 API for Issue Submit uses ADF format while REST v2 API for Issue Submit uses Plain String format based on Wiki Markup for the multi-line text field. The workflow validators based on multi-line text fields are unable to parse the text from the ADF representation due to these format changes. This in turn causes the validators to fail. Hence users are unable to create issues.

      Hence the Jira Expression framework used by the ScriptRunner does not work as intended.

      Expected Results

      The issue can be created on the new Global Issue Create modal.

      Actual Results

      We can not create an issue in the new Global Issue Create modal.

      Workaround

      Use Single line text field instead

      Fix for the issue

      Users may need to make modifications to their workflow validators set up on multi-line text fields.

      We've pushed out changes on the Jira Expressions framework: Working with JSON and RichText constructor from ADF Map as well as the changelog entries on the Jira Platform Developer portal to support these changes.

      Users on the old Global Issue Create modal can make changes to their existing workflow validators and then test out the changes by enabling the switch to the new Global Issue Create located under Settings > Personal Jira Settings.

      Attachments

        Issue Links

          Activity

            People

              7645729f7e9f Arbaaz Gowher
              1b9605f4e166 Anmol Gaba
              Votes:
              12 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: