Skip to content

[Seed Data] - Generate Tasks #4216

@Steph375

Description

@Steph375

Description

  • Generate realistic task data for each project.
  • Task status should depend on where the task due date falls in the car/project timeline.
  • Tasks can optionally be attached to a project work package, but don’t have to be.

Acceptance Criteria

  • Each project has 0–80 tasks.
  • Most projects have a moderate number of tasks.
  • Tasks are assigned to valid users.
  • Each task has a valid creator.
  • Task due dates are inside the project timeline.
  • If a task is attached to a work package, its dates fit within that work package timeline.
  • Past tasks are mostly DONE.
  • Future tasks are mostly IN_BACKLOG.
  • Current-period tasks are mostly IN_PROGRESS.
  • Tasks are stored in ctx.tasks.

Proposed Solution

  • Add prisma/seed/factories/taskFactory.ts
  • Create createSeedTask(ctx, project, overrides?)
  • Create generateSeedTasks(ctx)
  • Use ctx.projectTimelines to pick valid task dates.
  • Use ctx.workPackageTimelines when assigning a task to a work package.
  • Assign tasks to users from ctx.members, ctx.leads, etc.
  • Create tasks against the correct wbsElementId.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions