Query

Issue #99 resolved
Trupti Gaikwad created an issue

Hi Team,

I need the query for below requirement using Jira workflow Toolbox plugin.

If we have 3 custom fields, 1."Development Type" with values "Core" and "Custom"2.Story Points 3.Hours. So the requirement is, if Development Type=Core the Story Points field would be displayed and if Development Type=Custom the Hours field would be displayed.

Comments (6)

  1. Fidel Castro Armario repo owner

    Hi Trupti,

    Using JIRA Workflow Toolbox it's not possible to hide or show a fields in a screen depending on the value of other fields, since this plugin provides a set of conditions, validators and post-functions to be used in your workflows.

    Anyway, it's possible to set 2 validations to your transition, in order to ensure that:

    1. When "Development Type = Core" then field "Story Points" will be set and entered a value higher than 0, and field "Hours" is not set or zero.
    2. When "Development Type = Custom" then field "Hours" will be set and entered a value higher than 0, and field "Story Points" is not set or zero.

    To do it, you just need to use "Boolean validator with math, date-time or text-string terms" with the following configurations:

    #VALIDATION 1# When "Development Type = Core" then field "Story Points" will be set and entered a value higher than 0, and field "Hours" is not set or zero:

    conf-1.png Expression used is: %{12500} = "Core" IMPLIES ({12501} != null AND {12501} > 0 AND ({12502} = null OR {12502} = 0))

    #VALIDATION 2# When "Development Type = Custom" then field "Hours" will be set and entered a value higher than 0, and field "Story Points" is not set or zero:

    conf-2.png Expression used is: %{12500} = "Custom" IMPLIES ({12502} != null AND {12502} > 0 AND ({12501} = null OR {12501} = 0))

    Notice that in the particular JIRA instance I used to build this example:

    • %{12500} is field code for string value of field Development Type.
    • {12501} is field code for numeric value of field Story Points.
    • {12502} is field code for numeric value of field Hours.

    #Transition once configured:# Once configured, your transition will look like this:

    conf-3.png

  2. Trupti Gaikwad reporter

    Hi,

    I used but it's giving error for first validation.

    Only if the following mathematical expression is true: %{10630} = "Core" IMPLIES ({10460} != null AND {10460} > 0 AND ({17090} = null OR {17090} = 0)) :: PARSE ERROR * : Encountered ""IMPLIES "" at line 1, column 19. Was expecting one of: "+" ... "=" ... "!=" ... ... ... *

  3. Fidel Castro Armario repo owner

    Older versions of the plugin doesn't provide logical connective IMPLIES. I suggest you to update to most recent version of the plugin (currently 2.1.25).

    Anyway, you can use an equivalent expression which doesn't use connective IMPLIES:

    %{10630} != "Core" OR ({10460} != null AND {10460} > 0 AND ({17090} = null OR {17090} = 0))

    Please, close the issue if this solution is valid for you.

  4. Log in to comment