I am trying to clear a custom date field in a post function. The code I use works in the Console, but not in as a Post Function.
The basic code is:
def dateCf = customFieldManager.getCustomFieldObject(10900)
issue.setCustomFieldValue(dateCf, null)
Which when run as a Post Function returns an error: "Source GenericValue can not be null." But works fine in the console as long as I define and set the issue.
Also, the dates are actually cleared out, so the script is functional even though errors are returned.
Any ideas?
Hi @Jeff Abbott,
if your postfunction is on create, you must move it after the " Creates the issue originally".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.