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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.