BaryoDev / BaryoDev/barakoCMS

Lifecycle: a transition that requires fields, such as a reason to reject

Open
#809 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
6
Forks
7
Avg merge
4h 42m
Merged PRs (30d)
307

Description

Found by simulating a Claude Code build of Color Me Fun 2026 through the barako CLI (epic #801) on 14 September 2026; the event registration app for the Rotary Club of Koronadal is the acceptance test. Simulation page: https://claude.ai/code/artifact/05afda1a-6461-431d-aff0-50b30d3b0778

"Choosing a reason is what sends the email; rejection must never be a silent state." A transition today moves an entry between states with a permission check, and nothing stops a Reject without a reason.

## Change

A transition can declare required fields (`RejectionReason` required for `Reject`) and optional ones (`RejectionNote`). `POST /api/contents/{id}/transition` takes their values, validates them, writes them with the state change, and refuses without them. Workflows on the transition see the values.

## Done when

- Reject without a reason is a 400 naming the field, and nothing changes.
- Reject with a reason writes it and fires the rejection workflow, which reads `{{data.RejectionReason}}`.

Contributor guide

Open the contributing guide

Research direction

Start at POST /api/contents/{id}/transition and trace how transitions perform permission checks, state changes, and invoke workflows. Add required and optional transition fields, validate and persist their values atomically with the state change, and verify the documented Reject-without-reason 400 and workflow access to {{data.RejectionReason}}.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.