1
0
Fork 0

Added support for adding a remote link

Signed-off-by: Arno van Lumig <arnovanlumig@gmail.com>
master
Arno van Lumig 2015-02-06 11:29:10 +01:00 committed by Arno van Lumig
parent 9095944c98
commit 3d62a9a273
1 changed files with 26 additions and 0 deletions

View File

@ -574,6 +574,32 @@ public class Issue extends Resource {
throw new JiraException("Failed add attachment to issue " + key, ex);
}
}
/**
* Adds a remote link to this issue.
*
* @param url Url of the remote link
* @param title Title of the remote link
* @param summary Summary of the remote link
*
* @throws JiraException when the link creation fails
*/
public void addRemoteLink(String url, String title, String summary) throws JiraException {
JSONObject req = new JSONObject();
JSONObject obj = new JSONObject();
obj.put("url", url);
obj.put("title", title);
obj.put("summary", summary);
req.put("object", obj);
try {
restclient.post(getRestUri(key) + "/remotelink", req);
} catch (Exception ex) {
throw new JiraException("Failed add comment to issue " + key, ex);
}
}
/**
* Adds a comment to this issue.