If field A is populated then field B must also be populated

Issue #87 resolved
Madhuy created an issue

Hi,

I have question regarding usage of "If field A is populated then field B must also be populated" feature as validation in workflows. I have tested the this feature and it is working absolutely fine, i need an extra functionality, I have field named "Root Cause Analysis(select list)" with values as A1, A2, A3, and A4 and another field "Analysis(select list)", so if A3 values is selected, then "Analysis" field should be mandatory. So without updating "Analysis" filed issue transition should not be changed..

So simply my requirement is validation should be done on the basis Custom Filed values not on Customfields..

Is it possible to do so...??

Comments (5)

  1. Fidel Castro Armario repo owner

    Hi Madhu,

    You can implement that validation using validator "Boolean validator with math, date-time or text-string terms" using the following configuration:

    conf-1.png

    Expression used is %{12100} = "A3" IMPLIES %{12101} != null . That expression uses logical connective IMPLIES, which is available since version 2.1.22. If you are using an earlier version of the plugin, you can use the following equivalent expression: %{12100} != "A3" OR %{12101} != null

    Notice that:

    • %{12100} if field code for Root Cause Analysis. This field code depends on each JIRA instance.
    • %{12101} is field code for Analysis. This field code depends on each JIRA instance.

    Once configure, the validation will look like this:

    conf-2.png

  2. Madhuy reporter

    Thanks for your valuable info. I have used "How to make a custom field mandatory when priority is "Critical" or "Blocker" and issue type is "Incident"?" this feature.

    Workflow toolbox customization.PNG

    Will it be good enough? As per our validation it looks ok..

  3. Fidel Castro Armario repo owner

    That validator should work, but you could find more intuitive the usage of "Boolean validator with math, date-time or text-string terms" with the following expression:

    %{10121} IN ["Development: Coding Error", "Undetermined by HEL24 Analyst"] IMPLIES %{10502} != null

    or if you are using a version of JIRA Workflow Toolbox previous to 2.1.22 you can use the following equivalent expression:

    %{10121} != "Development: Coding Error" AND %{10121} != "Undetermined by HEL24 Analyst" OR %{10502} != null

  4. Log in to comment