We're using the following code:
...
// Get Parent Link object
def cfSprint = customFieldManager.getCustomFieldObject('customfield_10109')
// Remove Parent Link from Clone
if (cfSprint) {
issue.setCustomFieldValue(cfSprint, null)
commentManager.create(issue, user, commentBody, false)
}
When the setCustomFieldValue is called, it works just fine. When issue is passed to the commentManager object, it fails. I believe that it thinks that issue is null for some reason.
Why it works in the first instance but not in the second, I don't understand. Can someone help me?