Skip to content

Promote pending gigs into projects and link ERPNext/CRM records #251

@michaelmwu

Description

@michaelmwu

Problem

Once a pending gig becomes real work, we need to promote it into a project without losing Discord provenance, applicant history, or staffing history. That promoted project should be able to link to ERPNext and CRM records.

Scope

Implement the promotion path from local pending_gig -> project, with external linkage to:

  • ERPNext Project
  • ERPNext Customer
  • ERPNext Contact
  • CRM account / people references

Where applicable, paid internal people should also be representable via ERPNext/Frappe HR Employee linkage.

API / Integration Notes

Use ERPNext via the official Frappe REST API resource model. Relevant official docs:

Suggested Behavior

  • Promote the existing local engagement row in place instead of creating a disconnected second record
  • Record contract_signed_at when the gig becomes a project
  • Create or link an ERPNext Project
  • Link the project to an ERPNext Customer
  • Link client-side people through ERPNext Contact when available
  • Link paid internal people through ERPNext/Frappe HR Employee records when available
  • Persist external ids locally for future sync and reconciliation

Acceptance Criteria

  • A local pending_gig can be promoted in-place to project
  • Promotion preserves existing Discord provenance, applicant data, and history
  • The promoted record can store ERPNext and CRM foreign ids
  • The system can create or attach ERPNext Project and Customer records
  • The system can attach ERPNext Contact and, where applicable, Employee references
  • Partial linkage is supported; missing external records do not block the local state transition

Parent

Part of #249

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