Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Script is not working as expected

Hi Team,

I have 2 select list fields( risk impact , risk occurence probablity)

I have created scripted field called risk level(calculated) and written down the below script, but not getting value in the risk level(calculated ) field , eve though no error in the script:

kindly please help:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.Issue
import java.util.logging.Logger

Logger logger = Logger.getLogger("") ("I am a test info log")

Issue mainIssue = issue
def customFieldManager = ComponentAccessor.getCustomFieldManager()

def riskimpact = customFieldManager.getCustomFieldObject("customfield_18484") as Integer

def riskoccprobablity = customFieldManager.getCustomFieldObject("customfield_18483") as Integer


if ( ( riskimpact * riskoccprobablity) == 0)
{ ("Value has been updated")
return 0
else if ( ( riskimpact * riskoccprobablity) < 4)
{ ("Value has been updated")
return 1
else if ( ( riskimpact * riskoccprobablity) < 8 )
{"Value has been updated")
return 2
{"Value has been updated")
return 3

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

284 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you