Package net.sf.redmine_mylyn.api.model

Examples of net.sf.redmine_mylyn.api.model.IssueStatus


  @Override
  public Issues parseResponse(InputStream input, int sc) throws RedmineApiErrorException {
    Issues issues = super.parseResponse(input, sc);
    if(issues!=null) {
      for(Issue issue : issues.getAll()) {
        IssueStatus status = configuration.getIssueStatuses().getById(issue.getStatusId());
        issue.setClosed(status==null || status.isClosed());
      }
    }
    return issues;
  }
View Full Code Here


 
  @Override
  public Issue parseResponse(InputStream input, int sc) throws RedmineApiErrorException {
    Issue issue = super.parseResponse(input, sc);
    if(issue!=null) {
      IssueStatus status = configuration.getIssueStatuses().getById(issue.getStatusId());
      issue.setClosed(status==null || status.isClosed());
    }
    return issue;
  }
View Full Code Here

        root.getAttribute(RedmineAttribute.PRIORITY.getTaskKey()).setValue(""+priority.getId()); //$NON-NLS-1$
      } else if(conf.getIssuePriorities().getAll().size()>0){
        root.getAttribute(RedmineAttribute.PRIORITY.getTaskKey()).setValue(""+conf.getIssuePriorities().getAll().get(0)); //$NON-NLS-1$
      }
     
      IssueStatus status = conf.getIssueStatuses().getDefault();
      if(status!=null) {
        root.getAttribute(RedmineAttribute.STATUS.getTaskKey()).setValue(""+status.getId()); //$NON-NLS-1$
        root.getAttribute(RedmineAttribute.STATUS_CHG.getTaskKey()).setValue(""+status.getId()); //$NON-NLS-1$
      } else if(conf.getIssueStatuses().getAll().size()>0){
        root.getAttribute(RedmineAttribute.STATUS.getTaskKey()).setValue(""+conf.getIssueStatuses().getAll().get(0)); //$NON-NLS-1$
        root.getAttribute(RedmineAttribute.STATUS_CHG.getTaskKey()).setValue(""+conf.getIssueStatuses().getAll().get(0)); //$NON-NLS-1$
      }
     
View Full Code Here

    }
    return attr;
  }
 
  private void createOperations(TaskData taskData, Issue issue, Configuration configuration) {
    IssueStatus currentStatus = null;
    if(issue!=null) {
      currentStatus = configuration.getIssueStatuses().getById(issue.getStatusId());
    }
   
    if(currentStatus!=null) {
      createOperation(taskData, RedmineOperation.none, ""+currentStatus.getId(), currentStatus.getName()); //$NON-NLS-1$
    }
   
    createOperation(taskData, RedmineOperation.markas, null);
  }
View Full Code Here

    Configuration configuration = getRepositoryConfiguration(taskRepository);
    Assert.isNotNull(configuration);
   
    //Set CompletionDate, if Closed-Status
    TaskAttribute attribute = taskData.getRoot().getMappedAttribute(RedmineAttribute.STATUS.getTaskKey());
    IssueStatus issueStatus = configuration.getIssueStatuses().getById(RedmineUtil.parseIntegerId(attribute.getValue()));
    if(issueStatus==null) {
      IStatus status = new Status(IStatus.ERROR, RedmineCorePlugin.PLUGIN_ID, Messages.ERRMSG_MISSING_ISSUE_STATUS+attribute.getValue());
      StatusHandler.log(status);
    } else {
      if(issueStatus.isClosed()) {
        Date date = task.getCompletionDate();
        attribute =  taskData.getRoot().getMappedAttribute(RedmineAttribute.DATE_UPDATED.getTaskKey());
        try {
          date = new Date(Long.parseLong(attribute.getValue()));
        } catch(NumberFormatException e) {
View Full Code Here

        List list = (List)m.invoke(issueStatus);
       
        Field id = Property.class.getDeclaredField("id");
        id.setAccessible(true);
       
        IssueStatus i = new IssueStatus();
        id.setInt(i, 1);
        i.setClosed(true);
        list.add(i);
       
        i = new IssueStatus();
        id.setInt(i, 2);
        i.setClosed(false);
        list.add(i);
       
      } catch (Exception e) {
        issueStatus=null;
        e.printStackTrace();
View Full Code Here

TOP

Related Classes of net.sf.redmine_mylyn.api.model.IssueStatus

Copyright © 2018 www.massapicom. 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.