Skip to content

Add prospect ownership and management system#537

Merged
bokelley merged 6 commits intomainfrom
bokelley/fix-org-owner-unassigned
Jan 4, 2026
Merged

Add prospect ownership and management system#537
bokelley merged 6 commits intomainfrom
bokelley/fix-org-owner-unassigned

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Jan 4, 2026

Summary

Enhances the prospect management system to support proper ownership tracking and actionable dashboards for admins.

  • Database migration: Converts legacy prospect_owner text field to org_stakeholders records
  • 5 new Addie admin tools: my_engaged_prospects, my_followups_needed, unassigned_prospects, claim_prospect, suggest_prospects
  • Admin Dashboard: "My Prospects" section at top showing hot prospects and items needing follow-up
  • Slack App Home: Prospect stats in admin panel showing hot/followup/total counts
  • API Enhancement: mine=true filter on /api/admin/prospects endpoint

Test plan

  • Run migration on staging to verify prospect_owner -> org_stakeholders conversion
  • Test Addie tools in Slack: "Which of my prospects are most engaged?"
  • Verify My Prospects section appears on admin dashboard for users with owned prospects
  • Verify prospect stats appear in Slack App Home for admins
  • Test ?mine=true filter on prospects page

🤖 Generated with Claude Code

bokelley and others added 4 commits January 3, 2026 19:48
The recent inline owner selector change switched from reading
`organizations.prospect_owner` (text field) to `org_stakeholders` table.
However, existing orgs still have owners in the legacy field without
corresponding stakeholder records.

Add fallback to display `prospect_owner` when no stakeholder owner exists.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. Team dropdown now shows all aao-admin working group members instead of
   only users who are already owners somewhere. This enables assigning any
   admin as owner, not just the current user.

2. Watch button no longer overwrites owner role. If you're the owner and try
   to watch (or unwatch), the API now returns an error instead of changing
   your role from 'owner' to 'interested'.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Database migration to convert legacy prospect_owner text to org_stakeholders records
- 5 new Addie admin tools: my_engaged_prospects, my_followups_needed, unassigned_prospects, claim_prospect, suggest_prospects
- "My Prospects" section at top of admin dashboard with hot/followup lists
- Prospect stats in Slack App Home admin panel
- mine=true filter on prospects API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley changed the title Fix org owner showing 'Unassigned' for legacy prospect_owner Add prospect ownership and management system Jan 4, 2026
bokelley and others added 2 commits January 3, 2026 21:01
Migration 113 already exists on main (113_disqualified_prospect_status.sql).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migration 114 was taken by 114_engagement_level_function.sql on main.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant