Package net.sf.redmine_mylyn.api.model.container

Examples of net.sf.redmine_mylyn.api.model.container.CustomValues


      issue.setParentId(1);
     
      issue.setAvailableStatusId(new int[]{1,3,4,5,6,2});
     
      /* CustomValues */
      issue.setCustomValues(new CustomValues());
      List lst = getList(issue.getCustomValues());
      lst.add(buildCustomValue(5, 2, null));
      lst.add(buildCustomValue(11, 6, "2.05"));
      lst.add(buildCustomValue(12, 1, "Oracle"));
      lst.add(buildCustomValue(13, 9, "2009-12-01"));
View Full Code Here


    te.setHours(hours);
    te.setActivityId(activityId);
    te.setUserId(userId);
    te.setSpentOn(df.parse(spentOn));
    te.setComments(comments);
    te.setCustomValues(new CustomValues());
    List lst = getList(te.getCustomValues());
    for (CustomValue v : values) {
      lst.add(v);
    }
    return te;
View Full Code Here

    assertNull(issue.getDueDate());
    assertEquals(3.5f, issue.getEstimatedHours(), 0.0);
    assertEquals(10, issue.getDoneRatio());

    //CustomValues
    CustomValues customValues = issue.getCustomValues();
    assertNotNull(customValues);
    assertNotNull(customValues.getAll());
    assertEquals(4, customValues.getAll().size());
    assertEquals("", customValues.getByCustomFieldId(2).getValue());
    assertEquals("2.05", customValues.getByCustomFieldId(6).getValue());
    assertEquals("Oracle", customValues.getByCustomFieldId(1).getValue());
    assertEquals("2009-12-01", customValues.getByCustomFieldId(9).getValue());
   
  }
View Full Code Here

    assertEquals(1.5, timeEntry.getHours(), 0.0);
    assertEquals(1, timeEntry.getActivityId());
    assertEquals("hard work", timeEntry.getComments());

    //CustomValues
    CustomValues customValues = timeEntry.getCustomValues();
    assertNotNull(customValues);
    assertNotNull(customValues.getAll());
    assertEquals(2, customValues.getAll().size());
    assertEquals("1", customValues.getByCustomFieldId(7).getValue());
    assertEquals("2010-08-20", customValues.getByCustomFieldId(10).getValue());
  }
View Full Code Here

    }

    /* Custom Attributes */
    int[] customFieldIds = cfg.getProjects().getById(issue.getProjectId()).getCustomFieldIdsByTrackerId(issue.getTrackerId());
    if(customFieldIds!=null && customFieldIds.length>0) {
      CustomValues customValues = new CustomValues();
      issue.setCustomValues(customValues);
      for (int customFieldId : customFieldIds) {
        taskAttribute = root.getAttribute(IRedmineConstants.TASK_KEY_PREFIX_ISSUE_CF + customFieldId);
        if(taskAttribute!=null) {
          customValues.setCustomValue(customFieldId, formatCustomValue(taskAttribute.getValue(), customFieldId, cfg));
        }
      }
    }
   
   
View Full Code Here

        timeEntry.setComments(getValue(taskData, RedmineAttribute.TIME_ENTRY_COMMENTS));
       
        /* Custom Attributes */
        List<CustomField> customFields = cfg.getCustomFields().getTimeEntryCustomFields();
        if(customFields!=null && customFields.size()>0) {
          CustomValues customValues = new CustomValues();
          timeEntry.setCustomValues(customValues);
          for (CustomField customField : customFields) {
            String value = getValue(taskData, IRedmineConstants.TASK_KEY_PREFIX_TIMEENTRY_CF+customField.getId());
            customValues.setCustomValue(customField.getId(), formatCustomValue(value, customField.getId(), cfg));
          }
        }
       
        /* Extension/Additional Attributes */
        IRedmineExtensionField additionalFields[] = RedmineCorePlugin.getDefault().getExtensionManager().getAdditionalTimeEntryFields(repository);
View Full Code Here

    //parent
    assertNotNull(obj.getSubtasks());
    assertEquals("[2]", Arrays.toString(obj.getSubtasks()));
    assertEquals("[1]", Arrays.toString(obj.getAvailableStatusId()));
   
    CustomValues cfs = obj.getCustomValues();
    assertEquals(3, cfs.getAll().size());
    assertEquals(10, cfs.get(10).getId());
    assertEquals(6, cfs.get(10).getCustomFieldId());
    assertEquals("2.1", cfs.get(10).getValue());

    Journals comments = obj.getJournals();
    assertEquals(2, comments.getAll().size());
    assertEquals(2, comments.get(2).getId());
    assertEquals(2, comments.get(2).getUserId());
View Full Code Here

    assertEquals(9, tEntrys.get(1).getActivityId());
    assertEquals(2, tEntrys.get(1).getUserId());
    assertEquals(REDMINE_DATE_FORMAT.parse("2007-03-23"), tEntrys.get(1).getSpentOn());
    assertEquals("My hours", tEntrys.get(1).getComments());

    CustomValues cfs = tEntrys.get(1).getCustomValues();
    assertEquals(1, cfs.getAll().size());
    assertEquals(5, cfs.get(5).getId());
    assertEquals(2, cfs.get(5).getCustomFieldId());
    assertEquals("", cfs.get(5).getValue());
   
    //TODO not implemented yet
    //IssueRelations
   
    Attachments attachments = obj.getAttachments();
View Full Code Here

TOP

Related Classes of net.sf.redmine_mylyn.api.model.container.CustomValues

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.