Hi to all i need some hellp
I need to get the version status that is in the field Fix Version.
On any language Jython Pythone JS
I'm not a programmer, but I tried to do that:
Status = issue.getFixVersions().getStatusObject().getName()
if Status == 'Unreleased':
result = False
description = "Comment"
else:
result = True
And this is expectedly not working.
Help please.
Once you've identified the version you want to look at from the list, you'll need to ask it about its release status.
getStatusObject is about issue status usually, versions don't have a status. You'll want to check isArchived and isReleased (if neither is true, it's an active version)
The getFixVersions() will return a collections
try something like
def fixV = issue.getFixVersions().toList()
fixV?.name.contains('blah')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much to all who responded. I solved this problem by Jython Validator :
from com.atlassian.jira import ComponentManager
from com.atlassian.jira.project.version import DefaultVersionManager
versionManager = ComponentManager.getComponentInstanceOfType(DefaultVersionManager)
result = True
for fixVersion in issue.getFixVersions():
for releasedVersion in versionManager.getAllVersionsReleased(True):
if fixVersion == releasedVersion:
result = False
description = "Comment"
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.