Can any one help me on fixing this code ? Purpose is to update the Sprint field values manually , but its not working
import com.atlassian.jira.issue.IssueManagerimport com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.util.DefaultIssueChangeHolderimport com.atlassian.jira.issue.ModifiedValueIssueManager im = ComponentAccessor.getIssueManager()MutableIssue issue = im.getIssueObject("PROD-2458")
if(issue){
//get the value
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("customfield_10504")
def cFieldValue = issue.getCustomFieldValue(cField)
// return cFieldValue
//update the value
def changeHolder = new DefaultIssueChangeHolder()
cField.updateValue(null, issue, new ModifiedValue(cFieldValue, "June'20_Sprint4"),changeHolder)
}else { return "Issue doesn't exist"}