import com.onresolve.jira.groovy.user.FormField
import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.PRIORITY
import org.apache.log4j.Logger
import org.apache.log4j.Level
def log = Logger.getLogger("Chaimha Log")
log.setLevel(Level.DEBUG)
def startDateField = getFieldById("customfield_10906")
def priorityField = getFieldById("priority")
def issuetypeField = getFieldById("issuetype")
def endDateField = getFieldById("customfield_11097")
def startDate = {try{Date.parse("MM/dd/yyyy",startDateField.getFormValue() as String )}catch(e){null as Date}}()
def today = new Date()
def priority = priorityField.getValue()
def priorityname = priority.getName()
log.debug 'priorityname: ' + priority
def issuetype = issuetypeField.getValue()
Line 19: def priorityname = priority.getName(),
getname() shows an error of unknown method.
However, it does run correctly.
The system is using the method correctly how can i make the method "known"?
Add
import com.atlassian.jira.issue.IssueConstant
to the top of the script. Then change
def priority = priorityField.getValue()
to instead read
def priority = priorityField.getValue() as IssueConstant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.