From bbe6a628dd3c80de1a53617424834060510d4334 Mon Sep 17 00:00:00 2001 From: Jacek Malolepszy Date: Fri, 25 May 2012 11:58:15 +0000 Subject: [PATCH] Add functionality change billed hours --- src/main/java/pl/com/it_crowd/youtrack/api/YoutrackAPI.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+), 0 deletions(-) diff --git a/src/main/java/pl/com/it_crowd/youtrack/api/YoutrackAPI.java b/src/main/java/pl/com/it_crowd/youtrack/api/YoutrackAPI.java index 385a76c..bf4c882 100644 --- a/src/main/java/pl/com/it_crowd/youtrack/api/YoutrackAPI.java +++ b/src/main/java/pl/com/it_crowd/youtrack/api/YoutrackAPI.java @@ -93,6 +93,21 @@ public class YoutrackAPI { return result; } + public void setTotalBilledHours(String issueSignature, Long billedHours) { + String url = serviceLocation + "/rest/issue/" + issueSignature + "/execute"; + ArrayList requestParameters = new ArrayList(); + requestParameters.add(new NameValuePair("command", "Billed hours " + billedHours)); + try { + WebRequest request = new WebRequest(new URL(url), HttpMethod.POST); + request.setRequestParameters(requestParameters); + webClient.getPage(request); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + public void setTotalIssueDuration(String issueSignature, Long issueTotalDuration){ String url = serviceLocation + "/rest/issue/" + issueSignature + "/execute"; ArrayList requestParameters = new ArrayList(); -- libgit2 0.24.0