1
0
Fork 0

- Added number to field types

master
Javier Molina 2014-08-01 14:37:05 +10:00 committed by Bob Carroll
parent 3cf604a6c1
commit da7e33e443
2 changed files with 9 additions and 1 deletions

View File

@ -594,6 +594,13 @@ public final class Field {
return JSONNull.getInstance();
else if (value instanceof TimeTracking)
return ((TimeTracking) value).toJsonObject();
} else if (m.type.equals("number")) {
if(!(value instanceof java.lang.Integer) && !(value instanceof java.lang.Double) && !(value
instanceof java.lang.Float) && !(value instanceof java.lang.Long) )
{
throw new JiraException("Field expects a Numeric value");
}
return value;
}
throw new UnsupportedOperationException(m.type + " is not a supported field type");

View File

@ -472,7 +472,8 @@ public class Issue extends Resource {
restclient);
if (projects.isEmpty() || projects.get(0).getIssueTypes().isEmpty())
throw new JiraException("Project or issue type missing from create metadata");
throw new JiraException("Project '"+ project + "' or issue type '" + issueType +
"' missing from create metadata. Do you have enough permissions?");
return projects.get(0).getIssueTypes().get(0).getFields();
}