Workflow doesn't seem to fully run Follow
I hope to get some help at least for this case (It looks like that if I don't start complaining, nobody will answer to my questions: I still 2 open and unanswered tickets in YouTrack, plus an unanswered email).
Anyway, please check this simple rule:
When a reporter add an issue without one or more required fields, he does see the notifications on the top of the screen, but he's still able to submit the ticket: why?
I want user to be unable to submit tickets without adding the required values.
"WP Version" and "PHP Version" are simply string fields (and I can't set them as required, apparently). Their default value is "Undefined" (ctrl-space doesn't propose this value, so I have to manually enter it).
"Affected versions" is a field used among other projects, where this value is not always required, so I want to make it mandatory only here (the field is shared among projects, but I use different bundles for different projects).
I hope you have everything you need to help me.
Anyway, please check this simple rule:
rule Required fields when !issue.isReported() { Type.required("Please select an issue type"); if (issue.Type == {Bug}) { Affected versions.required("Please select at least one affected version"); assert WP Version == "Undefined": "Please specify WordPress version installed by the user."; assert PHP Version == "Undefined": "Please specify PHP version installed on user's server."; assert Subsystem == {No subsystem}: "Please select the subsystem"; } }
When a reporter add an issue without one or more required fields, he does see the notifications on the top of the screen, but he's still able to submit the ticket: why?
I want user to be unable to submit tickets without adding the required values.
"WP Version" and "PHP Version" are simply string fields (and I can't set them as required, apparently). Their default value is "Undefined" (ctrl-space doesn't propose this value, so I have to manually enter it).
"Affected versions" is a field used among other projects, where this value is not always required, so I want to make it mandatory only here (the field is shared among projects, but I use different bundles for different projects).
I hope you have everything you need to help me.
Please sign in to leave a comment.
If you want to compare a field value with a default 'empty' value please use null, e.g. assert WP Version == null: "Please specify WordPress version installed by the user.";
This is the updated rule:
As you can see, now reporter is blocked from submitting the issue, but he also get stuck on it: no way to get our from that rule.
Almost there.
Now I can go further the issue reporting, but got something new (see attachment).
Basically I'm asked to select the subsystem, I do so, then I try to click on "Create issue".
Issue doesn't get created and I keep getting asked to select the subsystem, even if it's already selected.
Please also attach screenshot/screencast.
However if I manually refresh the page, I can submit the ticket, so it looks like the refresh done by YT is not an actual refresh.
Also, the fact that I can submit the ticket it's a sign the the workflow rule is still not fully working, as I' supposed to be asked to fill the WP and PHP version fields (that are empty/undefined).
require() works with all fields, and it's even better than using assert, as it doesn't show that annoying "Assertion error" string in the notification.
Thanks Dmitry!
I wish the tickets I've created in YT could get answered as well promptly.