The Custom Workflows plugin:
https://www.redmine.org/plugins/custom-workflows
The examples was tested on Redmine 2.5.1 with Custom Workflows plugin from repo
https://github.com/anteo/redmine_custom_workflows
(commit 4cb99b58f24b6ff578b868a23a475e69ee00cfc6 )
You may import .xml files to your test redmine instance or copy-paste code from .rb files to new Custom workflow to the before_save field.
Some examples assumes that redmine_helpdesk plugin is set up: