The problem you need to solve:
When defining a Workflow using XML or on a Test environment, the id. of the event to fire are not always known ...
The Fire IssueEvent by Name Workflow Function requests to an extension of the EventTypeManager, the Event Type Id. using the Name ...
The Bonus :
In order to extend capacities of the Mail Template Manager, when the event is fired, additionals parameters are injected, useable by Mail Templates, provided by plugins.
Currently, there is no Workflow Function Factory allowing to edit this Function thrgough the user interface.
A such function has to be designed directly through XML.
To follow ...
The supported parameters are
|class.name||The Workflow Function class name : com.atlassian.jira.workflow.function.event.FireIssueEventNameFunction|
|eventTypeName or eventTypeId||Identification of Event to fire bys its name or id|
|sharedParams||List of Parameter issued from Transition context, that have to be injected in Event parameters.|
In case of event provided by plugin, the function is able to inject a I18nBean object, to be used by Mail Template.
This I18nBean object is built using I18n Bundle defined in Meta-Attribute of the Workflow, starting with minyaa.i18n. prefix.
The Post-Function configuration may be done in XML in Workflow descriptor as follow :
<function type="class"> <arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventNameFunction</arg> <arg name="eventTypeName">Timesheet Validated</arg> <arg name="sharedParams">worklogIds</arg> </function>