Two Custom Field Value should populate third custom field

Issue #742 resolved
Rjve Nautiyal created an issue

Hi Fidel,

I have a requirement, could you please confirm if JIRA workflow toolbox can help me on this- I have a field "Impact" which have value 1 I have a field "Probability" which have value 1 Third field "Inherent" should populate the value 1.

Other instance is - If impact value is selected 2 and Probability value is selected 1 then third field "Inherant" should populate the value 1.

So, I have a list for Impact and Probability which should provide the values of Inherant. based on two custom field value. Attached is the screenshot for reference.

I am using JIRA- 7.1.4 (Server Version)

Thanks & Regards, Rajeev Nautiyal

Comments (8)

  1. Fidel Castro Armario repo owner

    Hi @rjvenautiyal,

    Are Impact, Probability and Inherent fields Select Lists or Number fields?

    We can use a calculated field for Inherent, or use a post-function for setting the field when a certain transition is executed. If you allow to edit fields Impact and Probability at any moment, it's preferable to use a calculated field.

    Which option of you prefer?

  2. Rjve Nautiyal reporter

    Hi Fidel, Impact and Probability is select list which have drop down value 1 to 5.

    Calculated field is preferable but will inherent field populate based on the attachment shared.

    Thanks & Regards, Rajeev Nautiyal

  3. Fidel Castro Armario repo owner

    Hi @rjvenautiyal,

    You can use a "Calculated Number Field" with the following expression:

    Captura de pantalla 2017-08-17 a las 15.59.01.png

    Math expression is:

    getMatchingValue(%{aaaaa} + %{bbbbb}, ["11", "12", "13", "14", "15",
                                           "21", "22", "23", "24", "25",
                                           "31", "32", "33", "34", "35",
                                           "41", "42", "43", "44", "45",
                                           "51", "52", "53", "54", "55"],
                                          [1, 1, 1, 1, 1,
                                           1, 1, 2, 2, 2,
                                           2, 2, 3, 3, 3,
                                           3, 3, 4, 4, 4,
                                           4, 4, 5, 5, 5]) 
    

    replacing aaaaa with field code for Impact, and bbbbb with field code for Probability.

  4. Rjve Nautiyal reporter

    Hi Fidel,

    Many thanks for quick response and help it worked perfectly.

    I have one last query, can we have add a heading for each number, for example- 1- Very High 2- High 3- Medium 4- Low 5- Very Low

    So, the output should show- 1- Very High.

    Thanks & Regards, Rajeev Nautiyal

  5. Fidel Castro Armario repo owner

    In that case you should use a "Calculated Text Field" with the following text expression:

    getMatchingValue(%{aaaaa} + %{bbbbb}, ["11", "12", "13", "14", "15",
                                           "21", "22", "23", "24", "25",
                                           "31", "32", "33", "34", "35",
                                           "41", "42", "43", "44", "45",
                                           "51", "52", "53", "54", "55"],
                                          ["1 - Very High", "1 - Very High", "1 - Very High", "1 - Very High", "1 - Very High",
                                           "1 - Very High", "1 - Very High", "2 - High",      "2 - High",      "2 - High",
                                           "2 - High",      "2 - High",      "3 - Medium",    "3 - Medium",    "3 - Medium",
                                           "3 - Medium",    "3 - Medium",    "4 - Low",       "4 - Low",       "4 - Low",
                                           "4 - Low",       "4 - Low",       "5 - Very Low",  "5 - Very Low",  "5 - Very Low"]) 
    

    replacing aaaaa with field code for Impact, and bbbbb with field code for Probability.

  6. Rjve Nautiyal reporter

    Hi Fidel,

    Many thanks it worked perfectly. The plugin is excellent and very much flexible. Hats off to your help and support till date.

    In our instance we are able to achieve almost all of our requirement with workflow toolbox plugin.

    Thanks & Regards, Rajeev Nautiyal

  7. Log in to comment