Project specific workflow rule firing when ticket moved to project

Hi there,

I have a project on my install of YouTrack that deals with incoming support requests, called “QUEUE”. This project has a special attribute called “Client” which, through the use of the Workflow rules I am able to make mandatory:

rule Don't allow to submit issue without Client set

when issue.isReported() {
    Client.required("You must set the client attribute!");

My issue is that if a ticket mistakenly ends up in a different project that doesn’t have the “Client” attribute set to it then we’re unable to move that ticket into the QUEUE project as the workflow rule kicks in before the ticket has been moved and therefore the “Client” attribute isn’t available to be set (the ticket still "belongs" to the previous project which doesn't have the Client attribute)

Is there something I can add to my rule or have I written it so very badly to cause this issue?

Any help you can provide would be most gratefully received.
Comment actions Permalink
Try to add !project.changed condition, it prevents the workflow to be trigged on the project change.
Comment actions Permalink
Brilliant. Thank you.

Please sign in to leave a comment.