fix: 勾选jira模板创建缺陷空指针

This commit is contained in:
chenjianxing 2022-01-20 17:03:54 +08:00 committed by fit2-zhao
parent f3ef2727be
commit 3bf6a11aec
1 changed files with 4 additions and 1 deletions

View File

@ -186,9 +186,12 @@ public class JiraPlatform extends AbstractIssuePlatform {
JiraCreateMetadataResponse.Field item = createMetadata.get(name); JiraCreateMetadataResponse.Field item = createMetadata.get(name);
JiraCreateMetadataResponse.Schema schema = item.getSchema(); JiraCreateMetadataResponse.Schema schema = item.getSchema();
String key = item.getKey(); String key = item.getKey();
if (StringUtils.isBlank(key)) {
continue;
}
if (schema != null && schema.getCustom() != null && schema.getCustom().endsWith("sprint")) { if (schema != null && schema.getCustom() != null && schema.getCustom().endsWith("sprint")) {
JSONObject field = fields.getJSONObject(key);
try { try {
JSONObject field = fields.getJSONObject(key);
// sprint 传参数比较特殊需要要传数值 // sprint 传参数比较特殊需要要传数值
fields.put(key, field.getInteger("id")); fields.put(key, field.getInteger("id"));
} catch (Exception e) {} } catch (Exception e) {}