Workflow is not recognizing my custom fields

Hi all,

My workflow was working fine but recently I started to get errors.

For example, I have that rule :

rule Require Hours Worked

when State.changed {
  if (State == {Dev Complete}) {
    assert Hours Worked != null: "Error! You must assign a value first.";
  }
}

It is not recognizing Hours Worked. It is in my all projects, I know I have it and it was working fine so far.

This is the error I am getting :

Warning: Type t2 was not calculated
Error: No children in role "operation"(declared cardinality is 1)

Also in some fields I am getting "out of search scope" error.

Thanks
4 comments
Comment actions Permalink
Hi Gokhan,

Did you try to update your custom field schema? Click on 'Download workflows from server' icon in YouTrack Workflow Editor.

Thank you.
0
Comment actions Permalink
Of course. I am downloading and updating always
0
Comment actions Permalink
Ok I found the problem. You have to apply your custom field to all projects. After I set up someone else added new project and forgot to add this custom field.

So I have another question, is there any method to check if this field exists?
0
Comment actions Permalink
Actually such method would be senseless - only those fields are available for a workflow rule that are attached to project this rule is attached to.

In other words all issue fields are always available statically in the workflow language (by Ctrl+Space).
0

Please sign in to leave a comment.