Hi
I would like to add a scripted custom field with dropdown options Yes & No. I want the scripted field to check for attachment(s) in an issue and set custom field option as yes if there are attachments, else No.
What is the best way? and I have no experience in groovy and accessing attachments.
Any help is appreciated, Thanks
3 years later, I've found a solution to use the utils class within or without an automation rule -
class SlaUtils {
private MutableIssue issue
private Logger log
private Object ruleContext
SlaUtils (MutableIssue issue, Logger log, ruleContext=null) {
this.issue = issue
this.log = log
this.ruleContext = ruleContext
}
then I can either call it either with:
SlaUtils slaUtils = new SlaUtils(issue, log)
in case I am calling from console without a rule context, or with:
SlaUtils slaUtils = new SlaUtils(issue, log, ruleContext)
from actual automation rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.