This commit is contained in:
2025-07-14 20:22:44 +02:00
parent 3625421efe
commit 2a89828384
7 changed files with 96 additions and 31 deletions

View File

@ -33,6 +33,9 @@ class Issue
#[ORM\Column(nullable: true)]
private ?string $color = null;
#[ORM\Column(nullable: false)]
private bool $isClosed = false;
#[ORM\ManyToOne(targetEntity: Project::class, inversedBy: 'issues')]
#[ORM\JoinColumn(nullable: false)]
private Project $project;
@ -130,9 +133,13 @@ class Issue
public function getColor(): ?string
{
if($this->color) return $this->color;
elseif($this->parent) return $this->parent->getColor();
else return null;
if ($this->color) {
return $this->color;
} elseif ($this->parent) {
return $this->parent->getColor();
} else {
return null;
}
}
public function setColor(?string $color): static
@ -142,6 +149,18 @@ class Issue
return $this;
}
public function isClosed(): bool
{
return $this->isClosed();
}
public function setIsClosed(bool $isClosed): static
{
$this->isClosed = $isClosed;
return $this;
}
public function getProject(): Project
{
return $this->project;