Documentation for JIRA 4.3. Documentation for other versions of JIRA is available too.

I have a GenericValue issue. How do I convert this to an Issue object?

JIRA's API is moving slowly from representing issues as GenericValues (essentially untyped hashmaps) to the Issue interface). As such, you may find yourself having a GenericValue, but needing an Issue to pass to some more recent part of the API.

Note: often there are two methods available, one returning a GenericValue (eg. called getIssue) and another returning an Issue (eg. called getIssueObject). You may be able to avoid the conversion by picking the right method.

If you find yourself with a GenericValue, the best way to convert your issue is by declaring an IssueFactory in your object's constructor to set an issueFactory field in your object, and then call issueFactory.getIssue(GenericValue) to get the Issue.

If you're writing code that isn't managed by Pico container, and so won't have an IssueFactory passed in through the constructor, then you can call the static method IssueImpl.getIssueObject(GenericValue)