I'm trying to create a post-function with this logic:
You have to use post-function Set a field as a function of other fields of Jira Workflow Toolbox plugin with the following configuration:
Text to be parsed is:
[{00012}=null AND %{00017}="Major"]{00009}+2*{HOUR}
[{00012}=null]{00009}+3*{DAY}
Notice that:
Value of parameter "Field to be checked for matching with type 1 setting rules" has no effect, since we are not using type 1 setting rules.
Setting rules are evaluated in order, and once a rule is matched, the rest of the rules are not processed. That's the reason we write in first place the most restrictive setting rule (Due Date = null and Priority = Major), and in second place the most general one.
Once configured, the transition will look like this: