Our new Appfire Documentation Space is now live!

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

How to validate the field Priority when the value is None

Usecase:

  • To validate the Priority field value when it is None using the JSU Validators (Regular Expression)

  • To validate the Priority field value during the workflow transition using the JSU Validators (Regular Expression).

  • To validate the specific Priority field value during the workflow transition.

This article explains how to validate the Priority field value is None and throw the error message to change the value other than None.

Instructions

Please note, the steps below are added on the Create Issue transition. The validator can be added anywhere on the workflow transition according to your requirement.

  1. Edit the workflow that is associated with your project

  2. Select the Create Issue transition

  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.

    ((?!None).)+$


    Regular expression to validate the specific Priority field value.

    ((?!2).)+$
  6. Add the below Post function:

  7. Save and Publish the workflow.

  8. Create an issue by providing the input value None in the Priority field, it will show the message.



 

 

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