AFL
SkillsBuild

create-ticket

Creating a build ticket from a widget spec and recording it in the tracker.

One tracker item, one ticket. The ticket is small: it points at the markdown spec and the functional requirements; it does not repeat them. Tickets are created when a person asks for one, never in bulk.

Before you start

  • curl -sf "$TRACKER_URL/api/items/<id>" returns the item. Stop and report if not.
  • The item's action is rebuild, create_from_scratch or combine. If it is dont_migrate or unset, stop: nothing is decided yet.
  • The item has no jira_key. If it has one, stop and link it; a second ticket is never opened (use the rebuild route instead, see the tracker README).
  • A spec artifact exists for the item (artifacts in the response) and its file is in git. If not, stop and say the spec is missing.

Steps

  1. Read the spec. Confirm it has both parts: content type definition, and content migration (extract, transform, load order). If either is empty or TODO, stop and list what is missing.
  2. Preview the ticket: bun run ticket <id> --dry-run (run in apps/migration-tracker). Check the title and that the description names the spec path and, if one exists, the requirements artifact.
  3. Create it: bun run ticket <id>. The tracker reserves jira_key, creates (or reuses) the issue and stores the key. A 409 means another request is already creating it: wait and re-read the item, do not retry in a loop.
  4. Re-read the item and report the ticket key and link.

Rules

  • Do not write the ticket into Jira yourself; always go through the tracker route so the key is stored.
  • Do not change the item's status or action.
  • Report a failure with the response body; do not work around it.