1
0
Fork 0

Merge pull request #43 from javier-molina/master

master
Bob Carroll 2014-08-04 23:10:50 -07:00
commit 3bc59bcee2
4 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,4 @@
Bob Carroll <bob.carroll@alum.rit.edu> @rcarz
Kyle Chaplin <chaplinkyle@gmail.com> @chaplinkyle
Alesandro Lang <info@alesandro-lang.com> @alesandroLang
Javier Molina <javinovich@gmail.com> @javinovich

View File

@ -131,6 +131,7 @@ public class Component extends Resource {
}
private String name = null;
private String description = null;
private boolean isAssigneeTypeValid = false;
/**
@ -152,6 +153,7 @@ public class Component extends Resource {
self = Field.getString(map.get("self"));
id = Field.getString(map.get("id"));
name = Field.getString(map.get("name"));
description = Field.getString(map.get("description"));
isAssigneeTypeValid = Field.getBoolean(map.get("isAssigneeTypeValid"));
}
@ -191,6 +193,10 @@ public class Component extends Resource {
return name;
}
public String getDescription() {
return description;
}
public boolean isAssigneeTypeValid() {
return isAssigneeTypeValid;
}

View File

@ -604,6 +604,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();
}