Skip to content

feat: added new status in PLG onboarding flow#1568

Merged
anshulk-public merged 8 commits intomainfrom
feat/plg_rejected_status
May 5, 2026
Merged

feat: added new status in PLG onboarding flow#1568
anshulk-public merged 8 commits intomainfrom
feat/plg_rejected_status

Conversation

@anshulk-public
Copy link
Copy Markdown
Contributor

@anshulk-public anshulk-public commented Apr 29, 2026

Description

Extends the PLG onboarding data model with two new terminal statuses, three new review decisions, and a createdBy field:

plg-onboarding.model.js

  • Adds REJECTED and OUTDATED to PlgOnboarding.STATUSES
  • Adds CLOSED, REOPENED, and OFFBOARDED to PlgOnboarding.REVIEW_DECISIONS

plg-onboarding.schema.js

  • Adds createdBy attribute (string, optional, defaults to 'system') — tracks who initiated the onboarding record; set once on creation, never updated

Motivation and Context

The previous model only had two terminal-adjacent states and two review decisions (BYPASSED, UPHELD), which were insufficient to represent the full onboarding lifecycle:

  • REJECTED — needed as a hard terminal state when an admin explicitly denies a waitlisted onboarding via UPHELD. Previously the record stayed in WAITLISTED indefinitely with no way to distinguish "pending review" from "denied."
  • OUTDATED — needed as a soft terminal state for records that are no longer the active onboarding attempt (superseded by a new domain, manually closed, or deprovisioned). Distinct from INACTIVE to avoid corrupting the ASO UI dropdown logic.
  • CLOSED / OFFBOARDED / REOPENED — system-generated review decisions written when an admin transitions a record to OUTDATED via the new PATCH /plg/onboard/:onboardingId/status API. Each decision captures the source state: WAITLISTED → CLOSED, ONBOARDED → OFFBOARDED, REJECTED → REOPENED.
  • createdBy — fills the audit gap where updatedBy was tracked but the original creator was not, making it impossible to distinguish customer-initiated records from admin- or system-created ones.

How Has This Been Tested?

  • All 43 unit tests in the plg-onboarding test suite pass (plg-onboarding.model.test.js, plg-onboarding.schema.test.js, plg-onboarding.collection.test.js)
  • Schema validation tests explicitly cover all five valid review decisions and reject unknown values
  • createdBy default behaviour verified via schema attribute test

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

This PR will trigger a minor release when merged.

@anshulk-public anshulk-public merged commit e1d2be5 into main May 5, 2026
5 checks passed
@anshulk-public anshulk-public deleted the feat/plg_rejected_status branch May 5, 2026 10:46
solaris007 pushed a commit that referenced this pull request May 5, 2026
@solaris007
Copy link
Copy Markdown
Member

🎉 This PR is included in version @adobe/spacecat-shared-data-access-v3.57.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants