codex ticket rework
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Database\Factories;
|
||||
use App\Actions\ProjectTicketMetadata\InitializeProjectTicketMetadata;
|
||||
use App\Models\Project;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\TicketPriority;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
@@ -22,12 +22,15 @@ class TicketFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'acceptance_criteria' => fake()->paragraph(),
|
||||
'assignee_user_id' => null,
|
||||
'author_user_id' => User::factory(),
|
||||
'board_column_id' => null,
|
||||
'blocked_comment' => null,
|
||||
'description' => fake()->paragraphs(2, true),
|
||||
'is_blocked' => false,
|
||||
'parent_ticket_id' => null,
|
||||
'sequence_number' => 1,
|
||||
'story_points' => null,
|
||||
'ticket_key' => 'TEST-1',
|
||||
'title' => fake()->sentence(4),
|
||||
];
|
||||
@@ -46,14 +49,9 @@ class TicketFactory extends Factory
|
||||
|
||||
app(InitializeProjectTicketMetadata::class)->handle($project);
|
||||
|
||||
$priority = TicketPriority::factory()->for($project)->create([
|
||||
'name' => 'Medium',
|
||||
'position' => 1,
|
||||
]);
|
||||
|
||||
$ticket->project_id = $project->id;
|
||||
$ticket->ticket_type_id = $project->ticketTypes()->firstOrFail()->id;
|
||||
$ticket->ticket_priority_id = $priority->id;
|
||||
$ticket->ticket_priority_id = $project->ticketPriorities()->firstOrFail()->id;
|
||||
$ticket->sequence_number = 1;
|
||||
$ticket->ticket_key = "{$project->key}-1";
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user