1
0
-1
3 answers
- 210
Try this please:
issue.affectedVersions = null if (replica.affectedVersions.size() == 0){ issue.affectedVersions = [nodeHelper.getVersion("Default_Version", project)] } else{ replica.affectedVersions.each { v -> if (nodeHelper.getVersion(v.name, project)) issue.affectedVersions += nodeHelper.getVersion(v.name, project) else issue.affectedVersions += nodeHelper.createVersion(issue, v.name, v.description) } }
Let me know how it goes.
Thanks
Majid
CommentAdd your comment... - 10-1
Thanks for your reply Syed Majid Hassan . I figured it out in the mean time: I overwrote the affectedVersions at a later point in the script -.-
CommentAdd your comment... - 10-1
Current exception thrown:
Exalate has problems while trying to create an issue in this Jira. Details: [InvalidInputException: [Error map: [{versions=Please add a value to the required fields Affects Version/s!}]] [Error list: [[]]]
CommentAdd your comment...
Overview
Content Tools
search
attachments
weblink
advanced
Hi Community,
I am working on an internal connection on Jira on-prem.
AffectsVersion(s) is a mandatory field in one of the projects (by validator in workflow).
I want to set it to a default version "Default_Version".
Somehow this code does not work:
I receive an error message like: Can't set version object to java.util (unfortunately I can't access the tool right now for the correct message).
Interesting is that
returns "Default_Version" correctly.
Any idea? Does Exalate interfere with the validator here? Or is it just some logical mistake / typo?
Best regards,
Max