techtalk / JiraRestClient

A simple client for Atlassian JIRA service REST API
Other
65 stars 80 forks source link

Load assignee, reporter, and watchers for issues #3

Closed maclennann closed 10 years ago

maclennann commented 10 years ago

I need to know the actors associated with an issue.

JiraClient.LoadIssue now loads assignee, reporter, and watchers for an issue. The assignee and reporter are returned as part of the original API call, but in my version of Jira (5.1.8) it only returns metadata about watcher (i.e. '3 people watching'). In the API docs it says full data should be returned, but in order to remain backwards compatible, I make an extra API call in GetWatchers (a la GetComments) to fetch the watchers and strip the container.

These fields are populated into a new JiraUser class with name (username), displayName, and emailAddress. For some reason, emailAddress is not returned for watchers so that remains null.

quexy commented 10 years ago

Thanks for the feature. Unfortunately GitHub cannot determine your user from the commits (you used a different e-mail address) so your user is not linked to them, but they are merged nevertheless.