There is a fundamental difference between Jira Server/Data Center and Jira Cloud: In Jira Cloud post functions of apps are executed asynchronously as a 'background job'. This means a post function will be executed after the transition has been completed on Jira Cloud.

Note the following behaviors of the asynchronous execution: