Post function
There’s a post function you can use to transition item statuses on issue transition:
It allows mapping a current status to a new status for various other use cases, (eg. ‘pending review’ → ‘ordered’ for an “approve order” transition).
To decline items on a ‘decline’ transition you would map every status to declined ; just make sure to select the checkbox to update stock when items are declined. This returns the appropriate amount of items declined back to the stock attribute.
The configuration looks like this:
You can find the post function in the ‘Add Post Function to Transition’ screen of workflow administration: