feat: Add created_by field to issues (GH#748)
Add a created_by field to track who created each issue, similar to how comments have an author field. - Add CreatedBy string field to Issue struct - Add migration 029 to add created_by column to issues table - Update all SELECT/INSERT/Scan statements across storage layer - Populate created_by in bd create from actor chain - Display created_by in bd show output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -268,6 +268,7 @@ var createCmd = &cobra.Command{
|
||||
ExternalRef: externalRefPtr,
|
||||
EstimatedMinutes: estimatedMinutes,
|
||||
Wisp: wisp,
|
||||
CreatedBy: getActorWithGit(), // GH#748: track who created the issue
|
||||
}
|
||||
|
||||
ctx := rootCtx
|
||||
|
||||
@@ -111,6 +111,7 @@ func CreateIssueFromFormValues(ctx context.Context, s storage.Storage, fv *creat
|
||||
IssueType: types.IssueType(fv.IssueType),
|
||||
Assignee: fv.Assignee,
|
||||
ExternalRef: externalRefPtr,
|
||||
CreatedBy: getActorWithGit(), // GH#748: track who created the issue
|
||||
}
|
||||
|
||||
// Check if any dependencies are discovered-from type
|
||||
|
||||
@@ -140,6 +140,9 @@ var showCmd = &cobra.Command{
|
||||
fmt.Printf("Estimated: %d minutes\n", *issue.EstimatedMinutes)
|
||||
}
|
||||
fmt.Printf("Created: %s\n", issue.CreatedAt.Format("2006-01-02 15:04"))
|
||||
if issue.CreatedBy != "" {
|
||||
fmt.Printf("Created by: %s\n", issue.CreatedBy)
|
||||
}
|
||||
fmt.Printf("Updated: %s\n", issue.UpdatedAt.Format("2006-01-02 15:04"))
|
||||
|
||||
// Show compaction status
|
||||
@@ -319,6 +322,9 @@ var showCmd = &cobra.Command{
|
||||
fmt.Printf("Estimated: %d minutes\n", *issue.EstimatedMinutes)
|
||||
}
|
||||
fmt.Printf("Created: %s\n", issue.CreatedAt.Format("2006-01-02 15:04"))
|
||||
if issue.CreatedBy != "" {
|
||||
fmt.Printf("Created by: %s\n", issue.CreatedBy)
|
||||
}
|
||||
fmt.Printf("Updated: %s\n", issue.UpdatedAt.Format("2006-01-02 15:04"))
|
||||
|
||||
// Show compaction status footer
|
||||
|
||||
Reference in New Issue
Block a user