Hi!
I am doing a post function. I need to clear fixVersions field when my resolution is not 'Fixed'.
Please, advise.
See here: https://answers.atlassian.com/questions/73422/how-to-set-fixversions-with-groovy-through-scriptrunner
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.
It's not saved your way.
Currently I would suggest to use IssueService.update(), a minimal version would be like this:
issueService = ComponentAccessor.issueServicedef 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
Thank you Henning! I'll give it a shot.
It looks like you're new here. Sign in or register to get started.