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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.