Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

How to use a Regular Expression validator for Custom Field - Select List (cascading) using the JSU Automation Suite app

This article explains how to use a Regular Expression validator for Custom Field - Select List (cascading) using the JSU Automation Suite for Jira Workflows app.

Use case:

  • To identify usage of Regular Expression validator (JSU) for the Custom Field - Select List (cascading) and validate values. If State1, State2, and State3 are the values of the cascading custom field, then while validating the scenario for value None for State1, Jira transitions the workflow and for value State2 and State3, it should throw an error.

  • Use the Regular Expression validator (JSU) for the Custom Field - Select List (Cascading) to validate the value during the workflow transition.

Instructions

  1. Edit the workflow that is associated with your project.

  2. Select the specific transition where you want to add the validator.

  3. Select the Validators tab and click Add validator.

  4. Select Regular Expression Check (JSU) validator and click Add

  5. Enter the following Regular expression in the Regular expression field:

    The best practice is to test the regular expression here https://www.freeformatter.com/java-regex-tester.html, before entering the same in the validator.

    Here, the values State1, State2, and State3 are the values of the cascading field that you are validating for the None value.

    (State3|((State1|State2), .+?))
  6. Select the Concatenate multiple values = true

  7. Add the below Post function:

  8. Publish the workflow and execute the scenario.
    Select the value of the custom field.

    It will throw the below error message.



  • To select the Concatenate multiple values successfully enable all the modules of the JSU app from the Manage Apps screen.

  • The Concatenate multiple values available from JSU app version 2.24.2

  • It is recommended to test this scenario in a non-production environment before implementing it in a production environment.