Revert "Merge pull request 'KAN-11 Move remaining project metadata ownership to templates' (#94) from koda/kan-11-restliche-projekt-konfiguration-auf-templates-umstellen into epic/kan-3"
This reverts commitd39d21d303, reversing changes made toa8952d7867.
This commit is contained in:
@@ -48,9 +48,6 @@ class StoreProjectTicketRequest extends FormRequest
|
||||
{
|
||||
/** @var Project $project */
|
||||
$project = $this->route('project');
|
||||
$projectTemplateId = $project->project_template_id;
|
||||
$ownershipColumn = $projectTemplateId === null ? 'project_id' : 'project_template_id';
|
||||
$ownershipValue = $projectTemplateId ?? $project->id;
|
||||
|
||||
return [
|
||||
'acceptance_criteria' => ['nullable', 'array'],
|
||||
@@ -69,23 +66,17 @@ class StoreProjectTicketRequest extends FormRequest
|
||||
'ticket_priority_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
Rule::exists('ticket_priorities', 'id')->where(
|
||||
fn ($query) => $query->where($ownershipColumn, $ownershipValue),
|
||||
),
|
||||
Rule::exists('ticket_priorities', 'id')->where('project_id', $project->id),
|
||||
],
|
||||
'ticket_status_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
Rule::exists('ticket_statuses', 'id')->where(
|
||||
fn ($query) => $query->where($ownershipColumn, $ownershipValue),
|
||||
),
|
||||
Rule::exists('ticket_statuses', 'id')->where('project_id', $project->id),
|
||||
],
|
||||
'ticket_type_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
Rule::exists('ticket_types', 'id')->where(
|
||||
fn ($query) => $query->where($ownershipColumn, $ownershipValue),
|
||||
),
|
||||
Rule::exists('ticket_types', 'id')->where('project_id', $project->id),
|
||||
],
|
||||
'story_points' => ['nullable', 'integer', 'min:0'],
|
||||
'title' => ['required', 'string', 'max:255'],
|
||||
|
||||
Reference in New Issue
Block a user