Uploaded image for project: 'Atlassian Ecosystem'
  1. Atlassian Ecosystem
  2. ECO-26

Using Jira expression to validate Affected Services during transition does not work

    XMLWordPrintable

Details

    • 1
    • Severity 3 - Minor

    Description

      Issue Summary

      The result will always be false when using a Jira expression similar to the one below to check if the Affected Services field is not null during a workflow transition, even if the field has a value:

      issue.customfield_10041 != null

      Please note that to use a Jira expression in a transition validator, the ScriptRunner app is needed.

      Steps to Reproduce

      1. Add the Affected Services field to a transition screen.
      2. Add a "ScriptRunner Script" validator to that transition and add a simple Jira expression to check if the field is not null. For example:
        issue.customfield_10041 != null
      3. Publish the workflow changes.
      4. Go to an example ticket and try to transition it (set a value to the Affected Services field in the transition screen).

      Expected Results

      If the field is null then an error message should be displayed and the transition should not be allowed. If the field is not null, then the transition should be allowed.

      Actual Results

      Even adding a value to the Affected services field, the ScriptRunner validation with the Jira expressions will always treat it as null.

      Workaround

      Use the transition validation of type "Field Required Validator" that comes built-in in Jira. It works as expected.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ad5abbdc65b1 Marco Velasco
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: