public ProjectBean getCreateMap(String project, String issueType) {
ProjectBean reset = new ProjectBean();
if (project.indexOf("-") > -1) {
project = project.substring(0, project.indexOf("-"));
}
try {
reset = issueutil.getFieldsFromCreateMeta(project, issueType);
Map<String, Object> mapNameToKey = new HashMap<String, Object>();
// 获取字段
Map<String, FieldBean> map = reset.getFields();
if (map != null) {
for (String k : map.keySet()) {
FieldBean fieldBean = map.get(k);
mapNameToKey.put(fieldBean.getName(), k);
}
}
reset.setFieldsNameToKey(mapNameToKey);
issueutil.SetCommentMap(reset);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return reset;
}