1. Atlassian
  2. Project: Atlassian
  3. connector-eclipse

Commits

Jacek Jaroczynski [Atlassian]  committed e49b0ba

rest (issue url: open with browser action)

  • Participants
  • Parent commits 8b87347
  • Branches rest

Comments (0)

Files changed (2)

File com.atlassian.connector.eclipse.jira.core/src/com/atlassian/connector/eclipse/internal/jira/core/service/rest/JiraRestClientAdapter.java

View file
 
 	private final JiraClientCache cache;
 
+	private final String url;
+
 	public JiraRestClientAdapter(String url, String userName, String password, JiraClientCache cache) {
 
+		this.url = url;
 		this.cache = cache;
 
 		JerseyJiraRestClientFactory restFactory = new JerseyJiraRestClientFactory();
 	}
 
 	public JiraIssue getIssueByKey(String issueKey, IProgressMonitor monitor) throws JiraException {
-		return JiraRestConverter.convertIssue(getIssue(issueKey), cache /*, monitor*/);
+		return JiraRestConverter.convertIssue(getIssue(issueKey), cache /*, monitor*/, url);
 	}
 
 	public JiraStatus[] getStatuses() throws Exception {
 		List<JiraIssue> fullIssues = new ArrayList<JiraIssue>();
 
 		for (JiraIssue issue : issues) {
-			fullIssues.add(JiraRestConverter.convertIssue(getIssue(issue.getKey()), cache));
+			fullIssues.add(JiraRestConverter.convertIssue(getIssue(issue.getKey()), cache, url));
 		}
 
 		return fullIssues;

File com.atlassian.connector.eclipse.jira.core/src/com/atlassian/connector/eclipse/internal/jira/core/service/rest/JiraRestConverter.java

View file
 		return outPriority;
 	}
 
-	public static JiraIssue convertIssue(Issue issue, JiraClientCache cache /*, IProgressMonitor monitor*/)
+	public static JiraIssue convertIssue(Issue issue, JiraClientCache cache, String url /*, IProgressMonitor monitor*/)
 			throws JiraException {
 		JiraIssue jiraIssue = new JiraIssue();
 
 
 		jiraIssue.setType(JiraRestConverter.convert(issue.getIssueType()));
 
+		jiraIssue.setUrl(url + "/browse/" + issue.getKey());
+
 		return jiraIssue;
 	}