How to show High, Medium, Low in a customfield based on other two scriptedfields values

Digvijay Singh Gehlot
Contributor
May 30, 2024

Hi Team,

I have two scripted fields:

Business Score - which shows score from 5 to 15 

Compliance Score - which shows score from 0 to 5 and higher

There is third custom field: Governance Score - which will show High, Medium, Low based on the combination of values appearing in the above scripted fields.

Like: 

If Business = 12-15 and Compliance >0 then Governance = High

If Business = 12-15 and Compliance 0 then Governance = Medium

If Business = 8-11 and Compliance >0 then Governance = Medium

If Business = 5-7 and Compliance >5 then Governance = Medium

If Business = 8-11 and Compliance = 0 then Governance = Low

If Business = 5-7 and Compliance 0-4 then Governance = Low

Further, I want to create a behaviour on Governance field - if it is set as High, then specific fields will appear, if it is set as Medium, and other set of fields should appear ad so on.

Please guide me with the complete groovy/ if - else condition script or a basic scripting logic so that I can fulfill my above requirements. It would be a great learning.

Thank you.

1 answer

0 votes
Sherri Evans July 12, 2024

Hello, you could potentially use an automation to set the Governance field. 

  • Trigger, the value is changed for Business Score or Compliance Score 
  • If Matches JQL Condition, Business >= 12 and Business <= 15 and compliance >0 
  • Then Edit Field Governance Set To High
  • Else If Matches JQL Condition Business >=12 and Business >= 15 and Compliance = 0 
  • Then Edit Field Governance Set to Med 
  • and so on 
Sherri Evans July 12, 2024

Here is a rough example visually

ffd80407-f88d-4cab-bd9a-1a82b4993707.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events