Skip to content

Commit

Permalink
[RE-916]: fix Issue::getFieldIdByName()
Browse files Browse the repository at this point in the history
the method picked random fields from meta because of clause operator priority
  • Loading branch information
konorlevich committed Sep 26, 2023
1 parent 8888764 commit 51d9e85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 51d9e85

Please sign in to comment.