From 77d101acb4aa98e19572938200148c00e6c7a73b Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Sun, 22 Nov 2020 12:03:18 +0100 Subject: [PATCH] Wrong error message when validating custom field 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 --- api/soap/mc_project_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/soap/mc_project_api.php b/api/soap/mc_project_api.php index 9de79f6443..70fa36bb56 100644 --- a/api/soap/mc_project_api.php +++ b/api/soap/mc_project_api.php @@ -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 ) ); }