-
Bug
-
Resolution: Won't Fix
-
Low
-
5
-
Minor
-
4
-
-
Warranty
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
- Install a 3rd party app (e.g. script runner) for the instance
- Create a custom multi-line text custom field
- 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') - Perform a transition via the new issue transition experience
- 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:
- Future proofing expressions to cater for both formats of rich text fields.
- Working with JSON
- RichText constructor from ADF Map
- Changes impacting on workflow validators and conditions during transitions
- Changes impacting on workflow validators and conditions during issue create
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.
- is related to
-
JRACLOUD-93971 Consistent handling of rich text fields in jira expressions
- Gathering Interest
- relates to
-
JRACLOUD-78502 ScriptRunner/JMWE/other apps regex validator for certain rich-text custom fields fails on the new Global Issue Create modal
-
- Closed
-