Showing
1 changed file
with
19 additions
and
1 deletions
... | ... | @@ -14,7 +14,10 @@ import org.apache.http.auth.AuthenticationException; |
14 | 14 | import pl.com.it_crowd.youtrack.api.rest.Issues; |
15 | 15 | |
16 | 16 | import javax.xml.bind.JAXBException; |
17 | +import java.io.BufferedReader; | |
17 | 18 | import java.io.IOException; |
19 | +import java.io.InputStreamReader; | |
20 | +import java.net.MalformedURLException; | |
18 | 21 | import java.net.URL; |
19 | 22 | import java.security.GeneralSecurityException; |
20 | 23 | import java.util.ArrayList; |
... | ... | @@ -89,4 +92,19 @@ public class YoutrackAPI { |
89 | 92 | } |
90 | 93 | return result; |
91 | 94 | } |
92 | -} | |
95 | + | |
96 | + public void setTotalIssueDuration(String issueSignature, Long issueTotalDuration){ | |
97 | + String url = serviceLocation + "/rest/issue/" + issueSignature + "/execute"; | |
98 | + ArrayList<NameValuePair> requestParameters = new ArrayList<NameValuePair>(); | |
99 | + requestParameters.add(new NameValuePair("command", "Real completion time " + issueTotalDuration)); | |
100 | + try { | |
101 | + WebRequest request = new WebRequest(new URL(url), HttpMethod.POST); | |
102 | + request.setRequestParameters(requestParameters); | |
103 | + webClient.getPage(request); | |
104 | + } catch (MalformedURLException e) { | |
105 | + e.printStackTrace(); | |
106 | + } catch (IOException e) { | |
107 | + e.printStackTrace(); | |
108 | + } | |
109 | + } | |
110 | +} | |
\ No newline at end of file | ... | ... |
Please
register
or
login
to post a comment