ctx.issue.sprint.add doesn't work Follow
Hi,
When trying to set the sprint of an issue, I run into the following issue:
Cannot set value to custom field Sprints
Code looks something like this (board and sprint exists):
var board = entities.Agile.findByName("My Board").first();
var sprint = board.sprints.last();
ctx.issue.sprints.add(sprint);
Our sprints field seems to be of type version with support for multiple versions. I'm not sure how version relates to sprints, but from looking at examples this should be correct?
Thanks,
Christian
Please sign in to leave a comment.
Hi,
Could you please attach a screenshot of sprints field settings (Projects -> your project -> Edit project -> Fields -> sprints)?
Also, please try the following option of adding an issue to a board:
Does it work for you?
Hi,
Thanks, that command actually did the trick.
Here's a screenshot of the sprint settings. Would be interesting to know if something is wrong.
Fields name are case-sensitive, so just use Sprints instead of sprints:
Hope it helps.
I tried that but it didn't make any difference. But the command works fine at least!