Exemplo n.º 1
0
  private static void printCurrentUser(RedmineManager mgr) throws Exception {
    User currentUser = mgr.getCurrentUser();
    logger.debug("user="******"*****@*****.**");
    mgr.update(currentUser);
    logger.debug("updated user");

    User currentUser2 = mgr.getCurrentUser();
    logger.debug("updated user's mail: " + currentUser2.getMail());
  }
Exemplo n.º 2
0
 private static void tryGetNews(RedmineManager mgr)
     throws IOException, AuthenticationException, RedmineException, NotFoundException {
   List<News> news = mgr.getNews(null);
   for (News aNew : news) {
     System.out.println(aNew);
   }
 }
Exemplo n.º 3
0
 private static void tryCreateIssue(RedmineManager mgr)
     throws IOException, AuthenticationException, NotFoundException, RedmineException {
   Issue issue = new Issue();
   issue.setSubject("test123");
   mgr.createIssue(projectKey, issue);
 }
Exemplo n.º 4
0
 private static void getIssueWithRelations(RedmineManager mgr)
     throws IOException, AuthenticationException, NotFoundException, RedmineException {
   Issue issue = mgr.getIssueById(24580, INCLUDE.relations);
   List<IssueRelation> r = issue.getRelations();
   logger.debug("Retrieved relations " + r);
 }
Exemplo n.º 5
0
 private static void getSavedQueries(RedmineManager mgr)
     throws IOException, AuthenticationException, NotFoundException, RedmineException {
   List<SavedQuery> savedQueries = mgr.getSavedQueries("test");
   logger.debug("Retrieved queries " + savedQueries);
 }
Exemplo n.º 6
0
 private static void getProjects(RedmineManager mgr)
     throws IOException, AuthenticationException, RedmineException {
   List<Project> projects = mgr.getProjects();
   logger.debug("Retrieved projects " + projects);
 }
Exemplo n.º 7
0
 private static void tryCreateRelation(RedmineManager mgr)
     throws IOException, AuthenticationException, NotFoundException, RedmineException {
   IssueRelation r = mgr.createRelation(49, 50, IssueRelation.TYPE.precedes.toString());
   logger.debug("Created relation " + r);
 }
Exemplo n.º 8
0
 private static void getProject(RedmineManager mgr)
     throws IOException, AuthenticationException, RedmineException, NotFoundException {
   Project test = mgr.getProjectByKey("test");
   System.out.println(test);
 }
Exemplo n.º 9
0
 private static void changeIssueStatus(RedmineManager mgr)
     throws IOException, AuthenticationException, RedmineException, NotFoundException {
   Issue issue = mgr.getIssueById(1771);
   issue.setSubject("new");
   mgr.update(issue);
 }
Exemplo n.º 10
0
 private static void getVersion(RedmineManager mgr)
     throws IOException, AuthenticationException, RedmineException, NotFoundException {
   // see Redmine bug http://www.redmine.org/issues/10241
   Version version = mgr.getVersionById(294);
   System.out.println(version);
 }
Exemplo n.º 11
0
 private static void tryGetAllIssues(RedmineManager mgr) throws Exception {
   List<Issue> issues = mgr.getIssues(projectKey, null);
   for (Issue issue : issues) {
     logger.debug(issue.toString());
   }
 }