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/1de42ae327d7a0abe3896335d5606e45 to your computer and use it in GitHub Desktop.
Save chuikoaleksandr/1de42ae327d7a0abe3896335d5606e45 to your computer and use it in GitHub Desktop.
Atlasteam, Jira, plugin MyGroovy. Validator for https://gist.github.com/chuikoaleksandr/28257f3535d996660af50b592af23dba
import com.atlassian.jira.component.ComponentAccessor
import com.opensymphony.workflow.InvalidInputException
def getCustomFieldValue(issue, Long fieldId) {
issue.getCustomFieldValue(ComponentAccessor.customFieldManager.getCustomFieldObject(fieldId))
}
if (!getCustomFieldValue(issue, 10000)) {
throw new InvalidInputException("Please indicate the reason for the increased priority")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment