Skip to content

Commit

Permalink
fix rendering custom fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsolt Gál committed Aug 15, 2024
1 parent 6677a1e commit 975f3e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Technodelight/Jira/Renderer/Issue/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,16 @@ private function renderContent(
Field $field,
OutputInterface $output,
array|string $value
): mixed {
): string {
// if custom field is some kind of atlassian object, we need to extract it's name and description
if (is_array($value)) {
return sprintf(
'%s%s',
$value['name'] ?? '',
!empty($value['description']) ? sprintf(' (%)', $value['description']) : ''
);
}

return $this->formatter->format($field, $output, $this->imageRenderer->render($value, $issue));
}
}

0 comments on commit 975f3e4

Please sign in to comment.