I have created an automation that is manually triggered in which a subtask is cloned, added to a different proejct as a task, and then linked to the trigger issue (subtask). When I run this rule I get a message that the issue could not be cloned and moved. Any idea how to get this to work?
This code is really heavy handed to update the fixversion field. I looked up and found Issue.setFixVersions([V]); approach. Is this deprecated?
Its a lot cleaner than the above answer but does not seem to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not saved your way.
Currently I would suggest to use IssueService.update(), a minimal version would be like this:
issueService = ComponentAccessor.issueService
def iip = issueService.newIssueInputParameters()
iip.setFixVersionIds(version.id)
def valRes = issueService.validateUpdate(user, issue.id, iip)
if (valRes.isValid()) {
issueService.update(user, valRes)
}
Of course this is without error handling etc.
Best regards,
Henning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.