Hello to all,
I am using JIRA 6.2.3 and accidentaly upgraded Behaviours Plugin, that is no longer supported in JIRA 6.2.x. It was merged into Script Runner plugin. Now I have to restore some functionality with Script Runner, but code from Behaviours field definition
import com.atlassian.crowd.embedded.api.User
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
FormField formTester = getFieldByName("Tester2");
ApplicationUser appUser = ComponentAccessor.getJiraAuthenticationContext().getUser();
User user = appUser.getDirectoryUser();
String currUserFullName = user.getDisplayName();
String currUserName = user.getName();
log.error (currUserFullName);
log.error (currUserName);
if(!formTester.getFormValue()){
formTester.setFormValue(currUserName);
}
returns (when clicking at Go)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script13.groovy: 5: unable to resolve class FormField
@ line 5, column 11.
FormField formTester = getFieldByName("Tester2");
^
1 error
A stacktrace has been logged.
My task is to populate custom field Tester2 (customFieldId=11030) with username of reporter at the time of issue creation. User Picker is the template I have selected at script definition.
What should I import to be able to use class FormField, or is there any alternative to that class?
I would be grateful for any hint.
Leos