Set Boards field in Workflow
How does one set the Boards field in a workflow?
When we create a new issue of type User Story, I want to automatically assign the User Story to the Board “Main Scrum Board” and to the Sprint “Unscheduled”.
The section of my worklfow which attemps to assign the board looks like this:
var createIssue = function(name) {
var newIssue = new entities.Issue(ctx.currentUser,
issue.project,
name);
newIssue.fields.Type = ctx.Type.Task;
newIssue.fields.boards = ctx.issue.boards;
newIssue.description = 'As a \n I want \n So that \n\n\n' + '**Definition of Done:**\n';
newIssue.links['subtask of'].add(issue);
};
But, it does not work.
Any suggestions on how to make this work would be greatly appreciated.
Thanks in advance!
Cecil
Please sign in to leave a comment.
Hello Cecil,
You need to use the applyCommand method for that. Use a standard command syntax like add board Main Scrum Board Unscheduled.
Thank you Alisa Kasyanova That worked great.