Пример #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());
  }
Пример #2
0
 private static void generateXMLForTimeEntry() {
   TimeEntry o = new TimeEntry();
   o.setId(13);
   o.setIssueId(45);
   o.setActivityId(3);
   o.setProjectId(55);
   o.setUserId(66);
   o.setHours(123f);
   o.setComment("text here");
   o.setSpentOn(new Date());
   String xml = RedmineXMLGenerator.toXML(o);
   logger.debug(xml);
 }
Пример #3
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);
 }
Пример #4
0
 private static void getSavedQueries(RedmineManager mgr)
     throws IOException, AuthenticationException, NotFoundException, RedmineException {
   List<SavedQuery> savedQueries = mgr.getSavedQueries("test");
   logger.debug("Retrieved queries " + savedQueries);
 }
Пример #5
0
 private static void getProjects(RedmineManager mgr)
     throws IOException, AuthenticationException, RedmineException {
   List<Project> projects = mgr.getProjects();
   logger.debug("Retrieved projects " + projects);
 }
Пример #6
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);
 }
Пример #7
0
 private static void tryGetAllIssues(RedmineManager mgr) throws Exception {
   List<Issue> issues = mgr.getIssues(projectKey, null);
   for (Issue issue : issues) {
     logger.debug(issue.toString());
   }
 }
Пример #8
0
 private static void generateXMLForUser() {
   User u = new User();
   u.setLogin("newlogin");
   String xml = RedmineXMLGenerator.toXML(u);
   logger.debug(xml);
 }