1
0
Fork 0

Merge pull request #9 from chaplinkyle/master

A couple issues I found. Display name was returning null for user. Outward issue is set on issue links now.
master
Bob Carroll 2013-09-20 16:11:59 -07:00
commit 440d437e72
3 changed files with 14 additions and 2 deletions

View File

@ -14,6 +14,7 @@ jira-client is still under heavy development. Here's what works:
* Search for issues with JQL
* Create issues
* Update issues (both system fields and custom fields)
* Finding allowed values for components and custom fields
* Transition issues to new states
* Add comments to issues
* Add attachments to issues
@ -133,6 +134,11 @@ public class Example {
);
for (CustomFieldOption cfo : cfselect)
System.out.println("Custom Field Select: " + cfo.getValue());
/* Print out allowed values for the custom multi-select box. */
List<CustomFieldOption> allowedValues = jira.getCustomFieldAllowedValues("customfield_5678", "TEST", "Task");
for (CustomFieldOption customFieldOption : allowedValues)
System.out.println(customFieldOption.getValue());
/* Set two new values for customfield_5678. */
issue.update()

View File

@ -31,6 +31,7 @@ public final class IssueLink extends Resource {
private LinkType type = null;
private Issue inwardIssue = null;
private Issue outwardIssue = null;
/**
* Creates a issue link from a JSON payload.
@ -51,6 +52,7 @@ public final class IssueLink extends Resource {
self = Field.getString(map.get("self"));
id = Field.getString(map.get("id"));
type = Field.getResource(LinkType.class, map.get("type"), restclient);
outwardIssue = Field.getResource(Issue.class, map.get("outwardIssue"), restclient);
inwardIssue = Field.getResource(Issue.class, map.get("inwardIssue"), restclient);
}
@ -97,13 +99,17 @@ public final class IssueLink extends Resource {
@Override
public String toString() {
return String.format("%s %s", getType().getInward(), getInwardIssue());
return String.format("%s %s", getType().getInward(), getOutwardIssue());
}
public LinkType getType() {
return type;
}
public Issue getOutwardIssue() {
return outwardIssue;
}
public Issue getInwardIssue() {
return inwardIssue;
}

View File

@ -55,7 +55,7 @@ public final class User extends Resource {
id = Field.getString(map.get("id"));
active = Field.getBoolean(map.get("active"));
avatarUrls = Field.getMap(String.class, String.class, map.get("avatarUrls"));
displayName = Field.getString(map.get("displayname"));
displayName = Field.getString(map.get("displayName"));
email = Field.getString(map.get("email"));
name = Field.getString(map.get("name"));
}