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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.