Examples of TaskData


Examples of org.eclipse.mylyn.tasks.core.data.TaskData

   
  }

  @Test
  public void createIssue_statusChanged() throws Exception {
    TaskData taskData = buildEmptyTaskData(TestData.issue2);
    fillTaskData(taskData, TestData.issue2);

    //Change Status (mark as)
    TaskAttribute attribute = taskData.getRoot().getAttribute(TaskAttribute.OPERATION);
    attribute.setValue(RedmineOperation.markas.getTaskKey());

    attribute = taskData.getRoot().getAttribute(RedmineAttribute.STATUS_CHG.getTaskKey());
    attribute.setValue("4");
   
    Issue issue = IssueMapper.createIssue(repository, taskData, null, cfg);
    assertNotNull(issue);
   
View Full Code Here

Examples of org.eclipse.mylyn.tasks.core.data.TaskData

    assertEquals(4, issue.getStatusId());
  }
 
  @Test
  public void createIssue_watchersChanged() throws Exception {
    TaskData taskData = buildEmptyTaskData(TestData.issue2);
    fillTaskData(taskData, TestData.issue2);

    //Old watchers
    TaskAttribute watchers = taskData.getRoot().getAttribute(RedmineAttribute.WATCHERS.getTaskKey());
    watchers.setValue("1");
    watchers.addValue("2");
   
    //Add a new watcher
    watchers.getAttribute(RedmineAttribute.WATCHERS_ADD.getTaskKey()).setValue("3");
View Full Code Here

Examples of org.eclipse.mylyn.tasks.core.data.TaskData

    assertEquals("[2, 3]", Arrays.toString(issue.getWatcherIds()));
  }
 
  @Test
  public void createTimeEntry() throws Exception {
    TaskData taskData = buildEmptyTaskData(TestData.issue2);
    fillTaskData(taskData, TestData.issue2);
   
    TimeEntry timeEntry = IssueMapper.createTimeEntry(repository, taskData, null, cfg);
    assertNotNull(timeEntry);
   
View Full Code Here

Examples of org.eclipse.mylyn.tasks.core.data.TaskData

    assertEquals("1", customValues.getByCustomFieldId(7).getValue());
    assertEquals("2010-08-20", customValues.getByCustomFieldId(10).getValue());
  }

  TaskData buildEmptyTaskData(Issue issue) throws Exception {
    TaskData taskData = new TaskData(new RedmineTaskAttributeMapper(repository, cfg), RedmineCorePlugin.REPOSITORY_KIND, repository.getUrl(), "" + issue.getId());
 
    Method m = RedmineTaskDataHandler.class.getDeclaredMethod("createAttributes", TaskRepository.class, TaskData.class, Issue.class, Configuration.class);
    m.setAccessible(true);
    m.invoke(taskDataHandler, repository, taskData, issue, cfg);
   
View Full Code Here

Examples of org.eclipse.mylyn.tasks.core.data.TaskData

  public void open() {
      String product = "";
     
      try {
        TaskData taskData = TasksUi.getTaskDataManager().getTaskData(task);
        product = taskData.getRoot().getMappedAttribute(RedmineAttribute.PROJECT.getTaskKey()).getValue();
       
        AbstractRepositoryConnector reposConn = TasksUi.getRepositoryConnector(taskRepository.getConnectorKind());
        if (reposConn instanceof RedmineRepositoryConnector) {
          RedmineRepositoryConnector redmineReposConnector = (RedmineRepositoryConnector)reposConn;
         
View Full Code Here

Examples of org.eclipse.mylyn.tasks.core.data.TaskData

  }

  public TaskData createPartialTaskData(TaskRepository repository,
      IProgressMonitor monitor,String user, String project, GitHubIssue issue) {

    TaskData data = new TaskData(getAttributeMapper(repository),
        GitHubRepositoryConnector.KIND, repository.getRepositoryUrl(),
        issue.getNumber());
    data.setVersion(DATA_VERSION);
   
    createOperations(data,issue);
   
   
    createAttribute(data, GitHubTaskAttributes.KEY,issue.getNumber());
    createAttribute(data, GitHubTaskAttributes.TITLE, issue.getTitle());
    createAttribute(data, GitHubTaskAttributes.BODY, issue.getBody());
    createAttribute(data, GitHubTaskAttributes.STATUS, issue.getState());
    createAttribute(data, GitHubTaskAttributes.CREATION_DATE, toLocalDate(issue.getCreated_at()));
    createAttribute(data, GitHubTaskAttributes.MODIFICATION_DATE, toLocalDate(issue.getCreated_at()));
    createAttribute(data, GitHubTaskAttributes.CLOSED_DATE, toLocalDate(issue.getClosed_at()));
   
    if (isPartial(data)) {
      data.setPartial(true);
    }

    return data;
  }
View Full Code Here

Examples of org.eclipse.mylyn.tasks.core.data.TaskData

  }

  public TaskData createTaskData(TaskRepository repository,
      IProgressMonitor monitor, String user, String project,
      GitHubIssue issue) {
    TaskData taskData = createPartialTaskData(repository, monitor, user, project, issue);
    taskData.setPartial(false);
   
    return taskData;
  }
View Full Code Here

Examples of org.eclipse.mylyn.tasks.core.data.TaskData

            status, query
                .getAttribute("queryText"));
 
        // collect task data
        for (GitHubIssue issue : issues.getIssues()) {
          TaskData taskData = taskDataHandler.createPartialTaskData(
              repository, monitor,user, project, issue);
          collector.accept(taskData);
        }
        monitor.worked(1);
      }
View Full Code Here

Examples of org.eclipse.mylyn.tasks.core.data.TaskData

    String user = GitHub.computeTaskRepositoryUser(repository.getUrl());
    String project = GitHub.computeTaskRepositoryProject(repository.getUrl());
   
    try {
      GitHubIssue issue = service.showIssue(user, project, taskId);
      TaskData taskData = taskDataHandler.createTaskData(repository, monitor, user, project, issue);
     
      return taskData;
    } catch (GitHubServiceException e) {
      throw new CoreException(GitHub.createErrorStatus(e));
    }
View Full Code Here

Examples of org.jbpm.task.TaskData

        // do nothing
      }
    }
    task.setPriority(priority);
   
    TaskData taskData = new TaskData();
    taskData.setWorkItemId(workItem.getId());
    taskData.setProcessInstanceId(workItem.getProcessInstanceId());
    taskData.setSkipable(!"false".equals(workItem.getParameter("Skippable")));
        //Sub Task Data
        Long parentId = (Long) workItem.getParameter("ParentId");
        if(parentId != null){
            taskData.setParentId(parentId);
        }

        String subTaskStrategiesCommaSeparated = (String) workItem.getParameter("SubTaskStrategies");
        if(subTaskStrategiesCommaSeparated!= null && !subTaskStrategiesCommaSeparated.equals("")){
            String[] subTaskStrategies =  subTaskStrategiesCommaSeparated.split(",");
            List<SubTasksStrategy> strategies = new ArrayList<SubTasksStrategy>();
            for(String subTaskStrategyString : subTaskStrategies){
                SubTasksStrategy subTaskStrategy = SubTasksStrategyFactory.newStrategy(subTaskStrategyString);
                strategies.add(subTaskStrategy);
            }
            task.setSubTaskStrategies(strategies);
        }

        PeopleAssignments assignments = new PeopleAssignments();
    List<OrganizationalEntity> potentialOwners = new ArrayList<OrganizationalEntity>();

    String actorId = (String) workItem.getParameter("ActorId");
    if (actorId != null && actorId.trim().length() > 0) {
      String[] actorIds = actorId.split(",");
      for (String id: actorIds) {
        potentialOwners.add(new User(id.trim()));
      }
            //Set the first user as creator ID??? hmmm might be wrong
            if (potentialOwners.size() > 0){
                taskData.setCreatedBy((User)potentialOwners.get(0));
            }
        }
   
        String groupId = (String) workItem.getParameter("GroupId");
    if (groupId != null && groupId.trim().length() > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.