sumoheavy / jira-ruby

A Ruby gem for the JIRA REST API
MIT License
654 stars 412 forks source link

Add Issue#resolution relationship #427

Closed jcouball closed 4 months ago

jcouball commented 6 months ago

Currently, there is no way to call issue.resolution to get the issue's resolution (or nil of the issue is not resolved). Instead, I have had to resort to something like issue.attrs['resolution'] to get a Hash representing the resolution.

This PR adds a relationship from the Issue resource to the Resolution resource to make this possible:

issue = client.Issue.find('1234567')
issue.resolution #=> nil or an instance of JIRA::Resource::Resolution

I believe this change is fully backward compatible with previous versions of this gem.

jcouball commented 6 months ago

This PR is ready for review.