Get the current action name
In a workflow function, to get the ID of the action (which is normally what you want rather than the name), use:
To get the action name you can use:
Get the previous and destination steps
Getting the current and destination steps depends on whether your function is placed above or below the functions to update the issue in the database and reindex.
The following code:
will return the current status - so if your script function is before the built-in functions to update the issue it will return the "previous" status, if it is after it will return the destination status.
To get the destination step use: