Skip to content

Asset status and condition are free-form strings with no database or DTO constraint #1587

Closed

Description

@yusuftomilola

Problem

Asset.status and Asset.condition are plain varchar columns defaulting to 'AVAILABLE' / 'GOOD'. Because create/update take any, nothing prevents status: 'banana', while the frontend defines AssetStatus / AssetCondition enums and the lifecycle service has its own transition table.

Proposed change

Define shared enums in the backend, use type: 'enum' (or a CHECK constraint) on the columns, validate with @IsEnum in the DTOs, and export them to Swagger.

Acceptance criteria

  • Invalid values are rejected with 400 at the API and by the database.
  • Existing rows are migrated safely.

Activity

  1. Hollahbisi commented on Oct 16, 2026

    @Hollahbisi

    @Hollahbisi has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I would love to work on this.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Hollahbisi to this issue.

  2. amberly-d commented on Oct 16, 2026

    @amberly-d
    Contributor

    @amberly-d has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello, I'd like to pick this issue up.

    I have hands-on experience with backend development, databases, and API design, as well as frontend work with React and modern CSS. I write tested, maintainable code and enjoy contributing to open source projects.

    I've gone through the details of this issue and I'm confident I can deliver a clean, well-tested solution that fits the codebase.

    I'd appreciate being assigned to this issue and look forward to contributing.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @amberly-d to this issue.

  3. drips-wave commented on Oct 16, 2026

    @drips-wave

    Congratulations, @amberly-d! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @amberly-d: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. grantfox-oss commented on Oct 17, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @amberly-d's PR #1678 was approved and merged by @yusuftomilola.

    🏆 @amberly-d: You earned 40 FoxPoints for this contribution! Your current tier: Builder (2,188 total points). Track your full progress on GrantFox.

    👏 Great work, @amberly-d! Keep contributing to DistinctCodes.

  5. drips-wave commented on Oct 17, 2026

    @drips-wave

    This issue has been completed by @amberly-d as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @amberly-d: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions