How to fetch the fixVersions ID from an issue using SIL routines and the JVersion structure

Problem description: A user might need to fetch a fixVersion ID from an issue using SIL routines and some scripting.

Currently, users can usually access the fixVersion field and retrieve the version description by default. However, some users might require the ID when building reports or for other purposes.

 Instructions

To obtain the fixVersion ID from an issue using the admGetProjectVersion routine and a JVersion structure, users can use a SIL code snippet like the one shown below:

runnerLog(%key%.fixVersion); runnerLog(admGetProjectVersion(project, %key%.fixVersion)); JVersion test = admGetProjectVersion(project, %key%.fixVersion); runnerLog(test.id);

If an issue has multiple versions assigned, an array will be returned by %key%.fixVersion, so it must be handled before passing a single value as the second parameter for the admGetProjectVersion routine (on line #5).

Please refer to the recorded test below:

SNAG-0001.mp4

https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15490140

https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15487117 (look for the JVersion structure type)