Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuikoaleksandr/47df6ce883824cacf884746e41ea6882 to your computer and use it in GitHub Desktop.
Save chuikoaleksandr/47df6ce883824cacf884746e41ea6882 to your computer and use it in GitHub Desktop.
Calculate field for complex priority https://atlasteam.ru/?p=1815
import com.atlassian.jira.component.ComponentAccessor
def getCustomFieldValue(issue, Long fieldId) {
ComponentAccessor.customFieldManager.getCustomFieldObject(fieldId)?.getValue(issue)
}
def customSelects = [10001,10002,10003]//todo set Custom Select List field id
def rezult = 1
customSelects.each{cfId->
rezult *= getCustomFieldValue(issue, cfId)?.data as Integer
}
return rezult
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment