feat: Add TargetType form and migration for plan targets
- Implemented TargetType form for managing target details including name, type, priority, stages, estimated size, profile criteria, pain points, value proposition, and preferred channels. - Created migration scripts for adding type and priority columns to plan objectives and tasks. - Added migration for creating plan targets and plan target stages tables, including foreign key constraints. - Introduced stakeholder management with forms and views for creating, editing, and listing stakeholders. - Enhanced UI with read more functionality for long text descriptions and filtering options in plan tab tables.
This commit is contained in:
1 parent
8c8d7a6f95
commit
8696acd01c
52 files changed
+3178
-125
No files matched your search
@@ -26,10 +26,18 @@ class Task extends FormEntity implements DateRangeInterface
|
||||
{
|
||||
public const TABLE_NAME = 'plan_tasks';
|
||||
|
||||
public const TYPE_MAX_LENGTH = 64;
|
||||
|
||||
private ?int $id = null;
|
||||
|
||||
private ?Plan $plan = null;
|
||||
|
||||
/**
|
||||
* Key of a task type set up in Settings > Configuration > Plan Settings (parameter plan_task_types);
|
||||
* see ItemTypeProvider (kind "task") for its name, description and pictogram.
|
||||
*/
|
||||
private ?string $type = null;
|
||||
|
||||
private ?string $name = null;
|
||||
|
||||
private ?string $description = null;
|
||||
@@ -74,6 +82,11 @@ class Task extends FormEntity implements DateRangeInterface
|
||||
->addJoinColumn('plan_id', 'id', false, false, 'CASCADE')
|
||||
->build();
|
||||
|
||||
$builder->createField('type', Types::STRING)
|
||||
->length(self::TYPE_MAX_LENGTH)
|
||||
->nullable()
|
||||
->build();
|
||||
|
||||
$builder->createField('name', Types::STRING)
|
||||
->length(255)
|
||||
->build();
|
||||
@@ -112,6 +125,8 @@ class Task extends FormEntity implements DateRangeInterface
|
||||
$metadata->addPropertyConstraint('name', new NotBlank(message: 'mautic.core.name.required'));
|
||||
$metadata->addPropertyConstraint('name', new Length(max: 255));
|
||||
$metadata->addPropertyConstraint('plan', new NotBlank(message: 'mautic.plan.task.plan.required'));
|
||||
$metadata->addPropertyConstraint('type', new NotBlank(message: 'mautic.plan.task.type.required'));
|
||||
$metadata->addPropertyConstraint('type', new Length(max: self::TYPE_MAX_LENGTH));
|
||||
$metadata->addConstraint(new ValidTaskParent());
|
||||
$metadata->addConstraint(new EndDateAfterStartDate());
|
||||
}
|
||||
@@ -134,6 +149,21 @@ class Task extends FormEntity implements DateRangeInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getType(): ?string
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function setType(?string $type): static
|
||||
{
|
||||
// FormEntity logs changes for the audit log; enums aren't stringable, plain strings are fine.
|
||||
$this->isChanged('type', $type);
|
||||
|
||||
$this->type = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
|
||||
Reference in new issue
Block a user