Skip to content

#4215 Add work package factory and process#4304

Open
Santiordon wants to merge 14 commits into
developfrom
#4215-work-package-timeline
Open

#4215 Add work package factory and process#4304
Santiordon wants to merge 14 commits into
developfrom
#4215-work-package-timeline

Conversation

@Santiordon

Copy link
Copy Markdown
Contributor

Changes

Added factory and process for work package generation on top of projects.

Checklist

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #4215 (issue #4215)

@Santiordon Santiordon requested a review from Steph375 July 4, 2026 23:14
@Santiordon Santiordon self-assigned this Jul 4, 2026
@Santiordon Santiordon linked an issue Jul 4, 2026 that may be closed by this pull request
@Santiordon

Copy link
Copy Markdown
Contributor Author

Dependency added: ora (an elegant terminal spinner for a cleaner and modern look for the seed generation).

@Steph375 Steph375 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good just a few things! Also not sure if I'm missing something but I see the project template configs include workPackageTemplates, but I don’t see those being created/connected in projectTemplateCreateInput. Are those work package templates created somewhere else that I missed, or should that be added there?

Comment thread src/backend/src/prisma/factories/work-package.factory.ts Outdated
Comment thread package.json Outdated
"@types/multer": "^1.4.12",
"canvas-confetti": "^1.9.3",
"mitt": "^3.0.1",
"ora": "^9.4.1",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since ora is imported from backend seed code, should it be declared in the backend workspace package rather than only in the root package.json not sure just a thought

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume its in this one? i just did yarn install and it put it there. might be good to get waverly's thoughts though.

Comment thread src/backend/src/prisma/factories/work-package.factory.ts Outdated
Comment thread src/backend/src/prisma/factories/work-package.factory.ts
@Santiordon Santiordon requested a review from Steph375 July 5, 2026 23:19
@wavehassman wavehassman self-requested a review July 6, 2026 14:06

@wavehassman wavehassman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be more templates and work packages at a null stage

Comment thread yarn.lock Outdated
eslint-plugin-cypress: "npm:4.3.0"
eslint-plugin-prettier: "npm:^5.2.2"
mitt: "npm:^3.0.1"
ora: "npm:^9.4.1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this should go in the backend

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okidokes

}

console.log(`${instance.constructor.name} complete`);
const totalElapsed = `${((Date.now() - totalStart) / 1000).toFixed(2)}s`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to the catch like

} catch (e) {
  const elapsed = `${((Date.now() - start) / 1000).toFixed(2)}s`;
  spinner.fail(`${index} ${name}   ${elapsed}`);
  const totalElapsed = `${((Date.now() - totalStart) / 1000).toFixed(2)}s`;
  console.log();
  console.log(`  ❌ Seed failed on ${instance.constructor.name.trim()} after ${totalElapsed}`);
  console.log();
  throw e;
}

The failures counter is never hit because it will throw

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@Santiordon Santiordon requested a review from wavehassman July 7, 2026 01:52

@wavehassman wavehassman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking back at this, I don't love how they're all WP1..2...3... and so forth. they are usually like design, manufacturing, etc. also no work packages are blocked by others, idk if that is a later ticket, but we should definitely have some blockers. there are no upcoming work packages, they are all hella overdue. can we make the deadlines more realistic?

also for the current projects, all work packages are active. only one or two should be active at a time normally, and if something is blocking another thing that can't be activated until the first one is completed

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Seed Data] Generate Work Packages with Timeline Logic

3 participants