Skip to content
Snippets Groups Projects
Commit 00db749f authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #12091 TIME 0:15 fix merge custom fields

parent 311b9af5
No related branches found
No related tags found
No related merge requests found
......@@ -259,13 +259,11 @@ class MergeController
//CustomFields
if (!empty($args['resId'])) {
$customs = !empty($resource['custom_fields']) ? json_decode($resource['custom_fields'], true) : [];
foreach ($customs as $custom) {
$decoded = json_decode($custom['value']);
if (is_array($decoded)) {
$resource['customField_' . $custom['custom_field_id']] = implode("\n", $decoded);
foreach ($customs as $customId => $custom) {
if (is_array($custom)) {
$resource['customField_' . $customId] = implode("\n", $custom);
} else {
$resource['customField_' . $custom['custom_field_id']] = $decoded;
$resource['customField_' . $customId] = $custom;
}
}
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment