Skip to content

BDR-001: Organization Import Active Default

Status: Accepted
Date: 2024-01-XX
Decided By: Client
Communicated Via: WhatsApp (could also be: Email/Slack/Meeting/Briefing Document/etc)
Affects: app/Imports/OrganisationsImport.php, Organization creation logic

Context

When importing organizations via CSV/Excel files, the import process encounters situations where the "active" column is either not specified in the import sheet or contains empty values. The system needed a clear rule for handling these cases to ensure consistent behavior during bulk organization imports.

Decision

Organizations imported without an explicit "active" value (missing column or empty cell) will default to ACTIVE status (is_active = true).

Rationale

  • User Experience: Newly imported organizations should be immediately usable without additional manual activation steps
  • Workflow Efficiency: Reduces post-import administrative overhead for bulk onboarding processes
  • Business Logic: Aligns with typical client expectations that imported data represents organizations ready for engagement
  • Error Prevention: Provides predictable behavior rather than leaving organizations in an undefined state

Implementation Notes

// In app/Imports/OrganisationsImport.php - validation rules
'is_active' => ['nullable', 'in:0,1,true,false'],

// In the import processing logic
'is_active' => $row['is_active'] ?? true, // Default to active when not specified or empty
  • None initially

Consequences

  • Positive:
    • Streamlined bulk organization onboarding process
    • Consistent and predictable import behavior
    • Reduced manual work for administrators
  • Negative:
    • Risk of accidentally activating organizations that should remain inactive
    • Potential for unwanted organizations to become immediately accessible
  • Mitigation:
    • Implement import preview functionality to review before final import
    • Consider adding bulk deactivation tools for post-import corrections
    • Document this behavior clearly in import documentation