Question about 'Send a Custom Email' post function

We have a multiselect custom field that is being used as part of the condition conrolling the Send a Custom Email post function. Here is what is in the condition

cfValues["Send to Logrequest"].toString() == "Yes"

What is needed is to be able to reset this custom field to "No" or none after the email is sent. Adding the 'Clear Field Value' post function from the JIRA Suite Utilities plugin results in no email. Also tried the 'Set Field Value to constant or Groovy expression' from the JIRA Misc Workflow Extensions pluginwith the same result of no email being sent. And out of desperation added

<% cfValues["Send to Logrequest"] = null %>

to the end of the message template. Still no email.

A general question about post functions. Are they executed in the order displayed? Or some other order?

The Send Email post functions *works* if the post function that tries to set/clear the custom field is removed. This has always been the case. It is as if the post functions are being excuted in parrallel or out of order.

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

Is there any other workaround available?
I have the same issue with a script that alters the comment AFTER the custom email is sent.
As the email uses the comment initially I need to keep the original comment with the sleep(700) before I alter it

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...