fix: make project template inheritance granular and safe
linter / quality (pull_request) Successful in 2m52s
tests / ci (8.4) (pull_request) Successful in 3m15s

This commit is contained in:
Nico Schröder
2026-09-08 12:03:07 +02:00
parent 0f125f17a3
commit 3122e00ed8
50 changed files with 1504 additions and 624 deletions
+17 -1
View File
@@ -13,7 +13,7 @@ use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Support\Str;
#[Fillable(['name', 'key', 'project_template_id', 'show_author', 'show_story_points'])]
#[Fillable(['name', 'key', 'project_template_id', 'show_author', 'show_story_points', 'template_overrides'])]
class Project extends Model
{
/** @use HasFactory<ProjectFactory> */
@@ -24,6 +24,7 @@ class Project extends Model
return [
'show_author' => 'boolean',
'show_story_points' => 'boolean',
'template_overrides' => 'array',
];
}
@@ -108,6 +109,21 @@ class Project extends Model
->orderBy('id');
}
/** @return list<string> */
public function configurationRelations(): array
{
return [
'boardColumns',
'notificationActions',
'repositoryConnections',
'ticketFieldDefinitions',
'ticketLinkTypes',
'ticketPriorities',
'ticketStatuses',
'ticketTypes',
];
}
public function tickets(): HasMany
{
return $this->hasMany(Ticket::class)