Workflow exception handling

I frequently have issues with workflows which are dependent on fields which do not exist for a particular project/scenario.

For example I have a project which does not have a 'State' field, which is used for collating subtasks. If we add an issue as a subtask, and that issue belongs to a project with the 'jetbrains-youtrack-subtasks' workflow, then we cannot close the issue due to the 'State' field not existing on the parent issue.

Would it be possible to improve this behaviour? It stops users from doing what they want (which is normally correct) and makes the system look bad.

Obviously I could remove the workflow, but if we continue to expand our use of linking issue, the workflow system will be reduced to it's lowest common denominator.

I've seen the addition of red underlining of workflows when the system recognises that they will not work correctly, but obviously this particular problem is not highlighted and I imagine it would be difficult to codify.

I have some suggestions/options why may help with a catch all solution...

1) Add exception handling to workflows so they can detect problems and take alternative action
2) Mark workflows as optional, so if an error occurs, they get ignored and the sysadmin receives email notification.
3) Allow workflows to check for the existence of a field
1 comment
Comment actions Permalink
Hi Manicmonkey,

Your problem is clear.

Unfortunately, there is no workaround, if this workflow was attached to your project. This workflow satisfies target requirements- the "State" field should be existed. In your case it's not clear, what should be the behaviuor, if Parent task has more than one subtasks, and, e.g. one subtask has the "State" field, but another hasn't.
I would like to suggest you to vote and to leave comments under this task , I 've recently created based on your request. We will change the workflow, it's nice idea. Thank you for the suggestion.  

Regarding some new global features in Workflow editor and related logic, soon we'll move to the In-Browser worflow editor, implementation of this  enhancement is in full swing. We suggest and very much apreciate our users to look at this issue: . We would like to take into account all your points and include them into In-Browser editor. You are welcome to leave comments, discuss and watch for updates on the issue.

Thank you and feel free to contact us, if have any problems, we'll be happy to help.

Please sign in to leave a comment.