Need to create default assignee if issue status gets changed to "Test"
Hello,
I need to create default assignee in case issue status is changed to "Test". I tried to apply the rule below but it didn't work. We use YouTrack 4.1.1 (build #5680)
rule Assign to Denis
{
var qa = project.getUser("denis");
if (qa != null) {
Assignee = qa;
}
}
Thanks,
Denis
I need to create default assignee in case issue status is changed to "Test". I tried to apply the rule below but it didn't work. We use YouTrack 4.1.1 (build #5680)
rule Assign to Denis
when State.becomes({Test})var qa = project.getUser("denis");
if (qa != null) {
Assignee = qa;
}
}
Thanks,
Denis
Please sign in to leave a comment.
the workflow looks correct, please describe what exactly doesn't work.
Please also attach the workflow.
Thanks
testing-workflows.zip (1.7KB)
Thanks,
Denis
Do you need any additional information on this issue from me?
Thanks,
Denis
what do you see in log (youtrack.log) on state switching?
Is 'denis' user included in the current project assignee set?
Has logged in user appropriate permissions to change 'Assignee' field? ("Update Issue" if 'Assignee' is public and 'Update Private Fields' if private)?
Please also check if 'qa' is not null, e.g. by message("'denis' user: " + qa.fullName);
Thanks for following up on that.
1. Unfortunately I haven't found youtrack.log file. We don't provide hosting for our Youtrack instance is hosted somewhere else I guess it is spinning on your side.
2. Login 'denis' is included in my project
3. Login 'denis' has admin permissions
4. Because of item #1 I was unable to insure that 'qa' is not null
Note: I mentioned 'Login' above because in youtrack user holds two connotations 'Login' and 'Full name'. In the rule I used value of 'Login' which is denis.
Regards,
Denis
3. Does logged in user (not denis, but who that changes state) has appropriate permissions.
You can check if 'qa' is null by the workflow:
rule set qa when State.becomes({Fixed}) { var qa = project.getUser("denis"); if (qa != null) { message("qa user: " + (qa != null)); // appears in YouTrack screen debug("qa user: " + (qa != null)); //appears in workflow.log } }I figure that out. Hopefully should work fine now. I didn't add workflow what I had created in "Youtrack-workflow" to Administration > Projects > Development > Workflow.I thought that "Upload to the server" from "Youtrack-workflow" is enough to make it work.
Thanks,
Denis