1
0
Fork 0

added getter for current jira user

master
Bob Carroll 2013-05-27 00:50:47 -07:00
parent fae00a8e6a
commit 215587d27d
2 changed files with 9 additions and 2 deletions

View File

@ -60,8 +60,9 @@ public class Example {
/* Vote for the issue. */
issue.vote();
/* And also watch it. */
issue.addWatcher("batman");
/* And also watch it. Add Robin too. */
issue.addWatcher(jira.getSelf());
issue.addWatcher("robin");
/* Open the issue and assign it to batman. */
issue.transition()

View File

@ -34,6 +34,7 @@ import net.sf.json.JSONObject;
public class JiraClient {
private RestClient restclient = null;
private String username = null;
/**
* Creates a JIRA client.
@ -60,6 +61,7 @@ public class JiraClient {
}
restclient = new RestClient(httpclient, URI.create(uri));
username = creds.username;
}
/**
@ -94,5 +96,9 @@ public class JiraClient {
public RestClient getRestClient() {
return restclient;
}
public String getSelf() {
return username;
}
}