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?
You'll need to provide a lot more details. What should your code do and what do you get in the log as error?
It says in comment remove parent link from clone, but the next line doesn't remove any link, just cleans a custom field value (and you don't update the issue, so it will only work if the post function is BEFORE fire event post function).
Add all the code removing all sensitive data and I'll try to help you
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.