Skip to content

Commit b5bba0e

Browse files
fix(IssueField): make labels nullable and remove default value initialization (#73)
Updated the 'labels' property in the IssueField class to be nullable and removed its default value initialization in the constructor. This change was necessary to prevent a issue that empty the labels in Jira if you don´t set any label Co-authored-by: Matheus Perusso <matheus@ixcsoft.com.br>
1 parent cdaa5d0 commit b5bba0e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/Issue/IssueField.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class IssueField implements \JsonSerializable
3535

3636
public ?IssueStatus $status = null;
3737

38-
public array $labels;
38+
public ?array $labels = null;
3939

4040
public Project $project;
4141

@@ -102,8 +102,6 @@ class IssueField implements \JsonSerializable
102102

103103
public function __construct($updateIssue = false)
104104
{
105-
$this->labels = [];
106-
107105
if ($updateIssue !== true) {
108106
$this->project = new \JiraCloud\Project\Project();
109107

0 commit comments

Comments
 (0)