Skip to content

Commit

Permalink
Wrong error message when validating custom field
Browse files Browse the repository at this point in the history
Given a custom field with some validation criteria (e.g. maximum length)
and shown when reporting, submitting a new issue with a non-empty value
not meeting that criteria was throwing ERROR_EMPTY_FIELD instead of
ERROR_CUSTOM_FIELD_INVALID_VALUE.

Fixes #27576
  • Loading branch information
dregad committed Nov 22, 2020
1 parent ed6571e commit 77d101a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/soap/mc_project_api.php
Expand Up @@ -712,7 +712,7 @@ function mci_project_custom_fields_validate( $p_project_id, &$p_custom_fields )
!custom_field_validate( $t_custom_field_id, $t_custom_field_values[$t_name] ) ) {
throw new ClientException(
"Invalid custom field '$t_name' value.",
ERROR_EMPTY_FIELD,
ERROR_CUSTOM_FIELD_INVALID_VALUE,
array( $t_name )
);
}
Expand Down

0 comments on commit 77d101a

Please sign in to comment.