How do I convert the Script that was working below?
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.component.ComponentAccessor;
import org.apache.commons.lang.time.DateUtils;
import java.text.SimpleDateFormat;
import java.util.Date.*;
if (issue.isSubTask()){
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/YYY");
def cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Launch Date Site")
if (cf) {
def result = issue.parentObject.getCustomFieldValue(cf);
if (result){
return sdf.format(result);
} else {
return
}
}
return
}
return
You've run into one of the things documented at https://scriptrunner.adaptavist.com/latest/jira/releases/UpgradingToJira8.html - that doc has lots of fixes for other things you may hit as well as this one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.