Initial commit
This commit is contained in:
135
src/App/Entity/JiraAssignee.php
Normal file
135
src/App/Entity/JiraAssignee.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
class JiraAssignee implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $signum;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $avatar;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $active = false;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSignum(): string
|
||||
{
|
||||
return $this->signum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $signum
|
||||
* @return JiraAssignee
|
||||
*/
|
||||
public function setSignum(string $signum): JiraAssignee
|
||||
{
|
||||
$this->signum = $signum;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return JiraAssignee
|
||||
*/
|
||||
public function setName(string $name): JiraAssignee
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEmail(): string
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $email
|
||||
* @return JiraAssignee
|
||||
*/
|
||||
public function setEmail(string $email): JiraAssignee
|
||||
{
|
||||
$this->email = $email;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAvatar(): string
|
||||
{
|
||||
return $this->avatar;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $avatar
|
||||
* @return JiraAssignee
|
||||
*/
|
||||
public function setAvatar(string $avatar): JiraAssignee
|
||||
{
|
||||
$this->avatar = $avatar;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isActive(): bool
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $active
|
||||
* @return JiraAssignee
|
||||
*/
|
||||
public function setActive(bool $active): JiraAssignee
|
||||
{
|
||||
$this->active = $active;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
'signum' => $this->getSignum(),
|
||||
'name' => $this->getName(),
|
||||
'email' => $this->getEmail(),
|
||||
'avatar' => $this->getAvatar(),
|
||||
'active' => $this->isActive(),
|
||||
];
|
||||
}
|
||||
}
|
||||
87
src/App/Entity/JiraIssueType.php
Normal file
87
src/App/Entity/JiraIssueType.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
class JiraIssueType implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $icon;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return JiraIssueType
|
||||
*/
|
||||
public function setName(string $name): JiraIssueType
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $description
|
||||
* @return JiraIssueType
|
||||
*/
|
||||
public function setDescription(string $description): JiraIssueType
|
||||
{
|
||||
$this->description = $description;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getIcon(): string
|
||||
{
|
||||
return $this->icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $icon
|
||||
* @return JiraIssueType
|
||||
*/
|
||||
public function setIcon(string $icon): JiraIssueType
|
||||
{
|
||||
$this->icon = $icon;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
'name' => $this->getName(),
|
||||
'description' => $this->getDescription(),
|
||||
'icon' => $this->getIcon(),
|
||||
];
|
||||
}
|
||||
}
|
||||
63
src/App/Entity/JiraStatus.php
Normal file
63
src/App/Entity/JiraStatus.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
class JiraStatus implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $color;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return JiraStatus
|
||||
*/
|
||||
public function setName(string $name): JiraStatus
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getColor(): string
|
||||
{
|
||||
return $this->color;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $color
|
||||
* @return JiraStatus
|
||||
*/
|
||||
public function setColor(string $color): JiraStatus
|
||||
{
|
||||
$this->color = $color;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
'name' => $this->getName(),
|
||||
'color' => $this->getColor(),
|
||||
];
|
||||
}
|
||||
}
|
||||
68
src/App/Entity/KanbanBoard.php
Normal file
68
src/App/Entity/KanbanBoard.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
class KanbanBoard implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var KanbanEntry[]|ArrayCollection
|
||||
*/
|
||||
private $kanbanEntries;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->kanbanEntries = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return KanbanEntry[]|ArrayCollection
|
||||
*/
|
||||
public function getKanbanEntries(): ArrayCollection
|
||||
{
|
||||
return $this->kanbanEntries;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param KanbanEntry[]|ArrayCollection $kanbanEntries
|
||||
* @return KanbanBoard
|
||||
*/
|
||||
public function setKanbanEntries(ArrayCollection $kanbanEntries): KanbanBoard
|
||||
{
|
||||
$this->kanbanEntries = $kanbanEntries;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param KanbanEntry $kanbanEntry
|
||||
* @return KanbanBoard
|
||||
*/
|
||||
public function addKanbanEntry(KanbanEntry $kanbanEntry): KanbanBoard
|
||||
{
|
||||
if(!$this->kanbanEntries->contains($kanbanEntry)) {
|
||||
$this->kanbanEntries->add($kanbanEntry);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param KanbanEntry $kanbanEntry
|
||||
* @return KanbanBoard
|
||||
*/
|
||||
public function removeKanbanEntry(KanbanEntry $kanbanEntry): KanbanBoard
|
||||
{
|
||||
if($this->kanbanEntries->contains($kanbanEntry)) {
|
||||
$this->kanbanEntries->removeElement($kanbanEntry);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function jsonSerialize()
|
||||
{
|
||||
return $this->kanbanEntries->getValues();
|
||||
}
|
||||
}
|
||||
444
src/App/Entity/KanbanEntry.php
Normal file
444
src/App/Entity/KanbanEntry.php
Normal file
@@ -0,0 +1,444 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
class KanbanEntry implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $key;
|
||||
|
||||
// 'fields' below
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $summary;
|
||||
|
||||
/**
|
||||
* @var JiraIssueType
|
||||
*/
|
||||
private $issueType;
|
||||
|
||||
/**
|
||||
* @var JiraStatus
|
||||
*/
|
||||
private $status;
|
||||
|
||||
/**
|
||||
* @var JiraAssignee
|
||||
*/
|
||||
private $assignee;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_11226
|
||||
* @var int
|
||||
*/
|
||||
private $prio;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_11225
|
||||
* @var string[]|ArrayCollection
|
||||
*/
|
||||
private $functionalAreas;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_10010
|
||||
* @var string
|
||||
*/
|
||||
private $externalId;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_10850
|
||||
* @var string
|
||||
*/
|
||||
private $externalLink;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_10840
|
||||
* @var string
|
||||
*/
|
||||
private $project;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_10844
|
||||
* @var string
|
||||
*/
|
||||
private $mhwebStatus;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_10847
|
||||
* @var string
|
||||
*/
|
||||
private $mhwebHot;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_10849
|
||||
* @var bool
|
||||
*/
|
||||
private $mhwebExternal = false;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_10904
|
||||
* @var string
|
||||
*/
|
||||
private $team;
|
||||
|
||||
/**
|
||||
* JIRA: customfield_11692
|
||||
* @var string
|
||||
*/
|
||||
private $answerCode;
|
||||
|
||||
/**
|
||||
* KanbanEntry constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->functionalAreas = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setId(int $id): KanbanEntry
|
||||
{
|
||||
$this->id = $id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getKey(): string
|
||||
{
|
||||
return $this->key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setKey(string $key): KanbanEntry
|
||||
{
|
||||
$this->key = $key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSummary(): string
|
||||
{
|
||||
return $this->summary;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $summary
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setSummary(string $summary): KanbanEntry
|
||||
{
|
||||
$this->summary = $summary;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JiraIssueType
|
||||
*/
|
||||
public function getIssueType(): ?JiraIssueType
|
||||
{
|
||||
return $this->issueType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param JiraIssueType $issueType
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setIssueType(?JiraIssueType $issueType): KanbanEntry
|
||||
{
|
||||
$this->issueType = $issueType;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JiraStatus
|
||||
*/
|
||||
public function getStatus(): ?JiraStatus
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param JiraStatus $status
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setStatus(?JiraStatus $status): KanbanEntry
|
||||
{
|
||||
$this->status = $status;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JiraAssignee
|
||||
*/
|
||||
public function getAssignee(): ?JiraAssignee
|
||||
{
|
||||
return $this->assignee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param JiraAssignee $assignee
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setAssignee(?JiraAssignee $assignee): KanbanEntry
|
||||
{
|
||||
$this->assignee = $assignee;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getPrio(): ?int
|
||||
{
|
||||
return $this->prio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $prio
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setPrio(?int $prio)
|
||||
{
|
||||
$this->prio = $prio;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]|ArrayCollection
|
||||
*/
|
||||
public function getFunctionalAreas(): ?ArrayCollection
|
||||
{
|
||||
return $this->functionalAreas;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[]|ArrayCollection $functionalAreas
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setFunctionalAreas(ArrayCollection $functionalAreas): KanbanEntry
|
||||
{
|
||||
$this->functionalAreas = $functionalAreas;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $functionalArea
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function addFunctionalArea(string $functionalArea): KanbanEntry
|
||||
{
|
||||
if(!$this->functionalAreas->contains($functionalArea)) {
|
||||
$this->functionalAreas->add($functionalArea);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $functionalArea
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function removeFunctionalArea(string $functionalArea): KanbanEntry
|
||||
{
|
||||
if($this->functionalAreas->contains($functionalArea)) {
|
||||
$this->functionalAreas->removeElement($functionalArea);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExternalId(): ?string
|
||||
{
|
||||
return $this->externalId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setExternalId(?string $externalId): KanbanEntry
|
||||
{
|
||||
$this->externalId = $externalId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExternalLink(): ?string
|
||||
{
|
||||
return $this->externalLink;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $externalLink
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setExternalLink(?string $externalLink): KanbanEntry
|
||||
{
|
||||
$this->externalLink = $externalLink;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getProject(): ?string
|
||||
{
|
||||
return $this->project;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $project
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setProject(?string $project): KanbanEntry
|
||||
{
|
||||
$this->project = $project;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMhwebStatus(): ?string
|
||||
{
|
||||
return $this->mhwebStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $mhwebStatus
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setMhwebStatus(?string $mhwebStatus): KanbanEntry
|
||||
{
|
||||
$this->mhwebStatus = $mhwebStatus;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function getMhwebHot(): ?bool
|
||||
{
|
||||
return $this->mhwebHot;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $mhwebHot
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setMhwebHot(?bool $mhwebHot): KanbanEntry
|
||||
{
|
||||
$this->mhwebHot = $mhwebHot;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function getMhwebExternal(): ?bool
|
||||
{
|
||||
return $this->mhwebExternal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $mhwebExternal
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setMhwebExternal(?bool $mhwebExternal): KanbanEntry
|
||||
{
|
||||
$this->mhwebExternal = $mhwebExternal;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTeam(): ?string
|
||||
{
|
||||
return $this->team;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $team
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setTeam(?string $team): KanbanEntry
|
||||
{
|
||||
$this->team = $team;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAnswerCode(): ?string
|
||||
{
|
||||
return $this->answerCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $answerCode
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setAnswerCode(?string $answerCode): KanbanEntry
|
||||
{
|
||||
$this->answerCode = $answerCode;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
'key' => $this->getKey(),
|
||||
'summary' => $this->getSummary(),
|
||||
'issueType' => $this->getIssueType(),
|
||||
'status' => $this->getStatus(),
|
||||
'assignee' => $this->getAssignee(),
|
||||
'prio' => $this->getPrio(),
|
||||
'functionalArea' => $this->getFunctionalAreas()->getValues(),
|
||||
'externalId' => $this->getExternalId(),
|
||||
'externalLink' => $this->getExternalLink(),
|
||||
'project' => $this->getProject(),
|
||||
'mhwebStatus' => $this->getMhwebStatus(),
|
||||
'mhwebHot' => $this->getMhwebHot(),
|
||||
'mhwebExternal' => $this->getMhwebExternal(),
|
||||
'team' => $this->getTeam(),
|
||||
'answerCode' => $this->getAnswerCode(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user