Please Help me! thanks -------taskadapter Issue Attachment related

Added by duojia liu almost 4 years ago

<dependency>
<groupId>com.taskadapter</groupId>
<artifactId>redmine-java-api</artifactId>
<version>1.23</version>
</dependency>

___________________________________________________
@Override
public void addIssue(String userName, String password) throws RedmineException, SecurityException {
final String projectKey = "ff";

RedmineManager rm = RedmineBaseManager.getInstance("liuduojia", "liu12345");
Project project = this.getProjectByIdentifier(projectKey);
List&lt;Version&gt; versons = rm.getVersions(project.getId());
File content = new File("D:"+File.separator+"logs.txt");
Attachment ua=null;
try {
ua = rm.uploadAttachment("Issue", content);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String token = ua.getToken();
System.out.println(token);
Issue issue = new Issue();
issue.setSubject("自动创建BUG测试版本");
issue.setTargetVersion(versons.get(0));
Issue issue1 = rm.createIssue("ff", issue);
}
______________________________________________________
Issue and   Attachment   Not related !!!

Replies (1)

(1-1/1)