Wednesday, 18 April 2012

class com.atlassian.jira.issue.customfields.impl.NumberCFType passed an invalid value of type: class java.lang.Long

        Double value pass in case of update or create Customfields of NumberCFType  Type.
  
        Double oldValue = null;
        Double newValue = null;
        IssueChangeHolder changeHolder = new DefaultIssueChangeHolder();

        CustomField custom_1 = customManager.getCustomFieldObjectByName("Custom_Fields1");

        oldValue = Double.parseDouble(String.valueOf(issue.getCustomFieldValue(custom_1)));

        newValue = Double.parseDouble(String.valueOf(250));

        custom_1.updateValue(null, issue, new ModifiedValue(oldValue,newValue), changeHolder);

No comments:

Post a Comment