item.getFields().getField("Priority").setValue(metadata.getPriority());
String itemId = null;
if (checkItemValues(item)) {
item.save();
itemId = String.valueOf(item.getID());
} else {
LOG.error("Failed to create issue because one or more fields were invalid. " +
"Check the above logs for more details.");
}