Workflows can be complicated . Define a reasonable test scenario for your workflow on a test project or test system. Often, it is the only way to find errors before putting your workflow in production.
Post functions are run after the transition has already occurred - there is no turning back. When you see your post function not working as expected, and you want to check if it is due to a configuration error, go through the log messages in the Transition logs page. This is the go-to place to understand what went wrong.
Custom fields not changing
Make sure the custom field is defined for the issue type you have.
Make sure it is one of the supported Custom Field Types when using set. Use one of the copy custom fields instead if appropriate. Otherwise, open an issue to get support for unsupported types.
Subtask have different issue types
You cannot create a subtask with the same issue type as the parent since Jira has unique subtask issue types . You can do something similar by using a naming convention that creates subtask types with similar names. For instance, Bug and Bug-sub-task. Then the %parent_issuetype%-subtask can be used to create a subtask with a name related type.