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?
Any idea how to accomplish this? Thanks in advance.
Check the order of post function execution.
Send custom email post function should executed before clear field value.
So if clear field value is executed first no email is sent.
You can change the order of post functions by click on the arrows. Check the screenshot below.
Hope that helps
Kostas is right on the condition script... it might work for you but it will also return true if the select contains something like "goldeneyes" - case notwithstanding.
It's because the send mail function starts a new thread, then pauses and sends the mail, to deal with a jira bug: https://jamieechlin.atlassian.net/browse/GRV-284
But your use case is valid, create an issue so you can track when it's done and I'll deal with it. But it will go in to the next major version... I'm not backporting anything at the moment.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot