How to bypass workflow conditions
Workaround for bypassing workflow conditions when running a transition via the mail handler
Description
When trying to run workflow transitions based on incoming emails, they may fail seemingly unexpectedly.
A strange line offers little to no explanation in the incoming mail log:
WARN: Could not execute transition.
This is only visible when you try to run a workflow transition via the Execute workflow transition action of the mail handler.
The reason behind is that Jira cannot run a transition with our app if there is a condition present, therefore the mail handler action will return with the above message.
Workaround
There is no out-of-the-box solution in Email This Issue for bypassing workflow conditions.
A way to work around this limitation is to combine automations with Email This Issue actions.
In case of running a transition on an existing issue, the following example may be of help.
Example
In a nutshell, you need to set up an automation that gets triggered after a comment is made by the mail handler and that which looks for the same criteria you are using in the mail handler (for example a regular expression). If it matches the conditions, the automation runs the transition instead of Email This Issue.
Let us look at an example process:
An email is sent to the mail handler's address and is processed by our application
Email this issue makes a comment on the existing ticket it finds
An automation gets triggered due to a comment being added The automation has 3 conditions:
Initiator is the same account as the default reporter in the mail handler
The issue has a specific component (which is also set by the mail handler when first creating the issue)
The regular expression is matched towards the email
If above conditions are met, the automation transitions the issue to the desired state
Last updated