Don't call a Merge & continue a dismissal of the ready call
This commit is contained in:
@@ -789,7 +789,7 @@ func (s *Store) SuggestDiscard(ctx context.Context, id, reason, actor string) er
|
||||
return s.setReady(ctx, id, actor, "discard", "task.discard_suggested", map[string]any{"id": id, "reason": reason})
|
||||
}
|
||||
|
||||
func (s *Store) ClearReady(ctx context.Context, id, actor string) error {
|
||||
func (s *Store) ClearReady(ctx context.Context, id, actor, reason string) error {
|
||||
return s.write(ctx, func(tx *sql.Tx, emit emitFunc) error {
|
||||
projectID := ""
|
||||
err := tx.QueryRowContext(ctx, `UPDATE tasks SET ready = '' WHERE id = ? AND status = ? AND ready != '' RETURNING project_id`, id, string(api.TaskStatusActive)).Scan(&projectID)
|
||||
@@ -799,7 +799,11 @@ func (s *Store) ClearReady(ctx context.Context, id, actor string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return emit(api.Event{Kind: "task.ready_cleared", ProjectId: &projectID, TaskId: &id, Actor: actor, Payload: map[string]any{"id": id}})
|
||||
payload := map[string]any{"id": id}
|
||||
if reason != "" {
|
||||
payload["reason"] = reason
|
||||
}
|
||||
return emit(api.Event{Kind: "task.ready_cleared", ProjectId: &projectID, TaskId: &id, Actor: actor, Payload: payload})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user