From 51d9e85f0fd613765f42006c4f610e2266204894 Mon Sep 17 00:00:00 2001 From: "petr.travkin" Date: Tue, 26 Sep 2023 16:19:45 +0400 Subject: [PATCH] [RE-916]: fix Issue::getFieldIdByName() the method picked random fields from meta because of clause operator priority --- src/Issue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Issue.php b/src/Issue.php index efb650c..09aff4b 100644 --- a/src/Issue.php +++ b/src/Issue.php @@ -385,7 +385,7 @@ public function getFieldValue(string $field_id, array $expand = []) public function getFieldIdByName(array $editMeta, string $fieldName): ?string { foreach ($editMeta as $fieldId => $meta) { - if ($meta['name'] ?? "" === $fieldName) { + if (in_array($fieldName, [$meta->name ?? "", $meta->key ?? ""], true)) { return $fieldId; } }