View Version Metadata on issue

Description

How do I view metadata that has been put at the version level on an issue? I tried the following:
1. The Metadata custom text field and set the default value to my key
2. Metadata calc field and set the default value as:
$metadataService.getMetadataValue($issue.projectObject, 'serena')
3. Metadata calc field and set the default value as:
$metadataService.getMetadataValue($issue.versionObject, 'serena')

None of these worked...any help would be greatly appreciated!

Environment

None

Activity

Show:
Andreas Spall (evolu.software)
February 5, 2014, 4:56 PM

Hi Thad,
you have to find the version-object in the issue-object-tree.
e.g the Version could be one of the AffectedVersions objects (the $issue within the Metadata calc field = https://docs.atlassian.com/jira/latest/com/atlassian/jira/issue/Issue.html)
the following line should/could work:
$metadataService.getMetadataValue($issue.getAffectedVersions().iterator().next(), 'serena')
regards
Andreas

Thad West
February 5, 2014, 5:39 PM

Success...That worked perfectly! I went after fix version instead, same exact concept.

Thad West
February 5, 2014, 6:18 PM

I forgot to say thank you!

Assignee

Andreas Spall (evolu.software)

Reporter

Thad West

Labels

None

Priority

Major
Configure