Our new Appfire Documentation Space is now live!

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

How to make some fields mandatory in the transition, only when certain conditions hold true using JSU

This article explains how to make a custom field (For example: Approval) mandatory only when the issue type is a bug and for all other issue types, make this custom field as optional.

Instructions

  1. The example workflow used in this article looks as mentioned below: 

    The workflow has two transitions "In Progress" and "IN  PROGRESS" (with extra space in between). The steps given below make only one transition available at any time for the end-user.

  2. On the "In Progress" transition, add the Value Field (JSU) condition from JSU as shown below:

    With the above condition, the "In Progress" transition is shown in the issues of all issue types, except for the Bug issue type.

  3. Go back to the workflow.

  4. On the "IN  PROGRESS" transition: Add the same Value Field (JSU) condition from JSU as shown below:

    1. The transition (IN  PROGRESS) only appears for the issues with the Bug issue type.

  5. In order to make the Approval field as mandatory to perform the transition:

    1. On the same transition, go to the Validators tab and add the Fields Required (JSU) validator from JSU as shown below:

  6. Publish the workflow and test the scenario.

 

This example works only when there are multiple transitions that lead to the same destination status.

 

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