Commits

Alek Mierzwicki committed 351b497

NONE Allowing to use null value for field while transitioning issue.

  • Participants
  • Parent commits b02c63d

Comments (0)

Files changed (2)

File core/src/main/java/com/atlassian/jira/rest/client/internal/async/AsynchronousIssueRestClient.java

 				}
 			}
 			final Iterable<FieldInput> fields = transitionInput.getFields();
-			JSONObject fieldsJs = new IssueUpdateJsonGenerator().generate(fields);
+			final JSONObject fieldsJs = new IssueUpdateJsonGenerator().generate(fields);
 			if (fieldsJs.keys().hasNext()) {
 				jsonObject.put("fields", fieldsJs);
 			}

File core/src/main/java/com/atlassian/jira/rest/client/internal/json/gen/IssueUpdateJsonGenerator.java

 		final JSONObject fields = new JSONObject();
 		if (fieldInputs != null) {
 			for (final FieldInput field : fieldInputs) {
-				if (field.getValue() != null) {
-					fields.put(field.getId(), generator.generateFieldValueForJson(field.getValue()));
-				}
+				final Object fieldValue = (field.getValue() == null) ? JSONObject.NULL
+						: generator.generateFieldValueForJson(field.getValue());
+
+				fields.put(field.getId(), fieldValue);
 			}
 		}
 		return fields;