gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmain5d144817Merge branch 'records-t40' into mainTicketsmain/missions/032-ticket-move.md

4.3 KB

  1. # Mission 032 — move a ticket to another project (worker M32)
  2. Task (Apollo's GO 2026-11-22 for caramboleyo's request, verbatim): "He wants the mpackdb tickets in project miserit-anthar moved into the new project mpackdb (0mwrqm40gshi) … Build: a move for a project admin of BOTH projects. API: POST /api/projects/:slug/tickets/:n/move {project}, plus a button on the ticket page. It reuses moveToProject: new number in the target, history kept, a history event in both projects, and the old URL redirects (301) to the new one. Relations and comments stay intact. Who may move must be clear in the README."
  3. Your job is ONLY the feature, gated and deployed, proven on the test project. Do NOT move the 8 miserit-anthar tickets; the conductor does that.
  4. ## Read first
  5. - /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md (in full)
  6. - /media/STORAGE/projects/hybriel/docs/HL-STANDARD.md, HL-PRIMER.md; COMPONENTS.md sections on buttons/forms if you add UI. Copy a working shape from the docs and existing app code. Give a DOCS line in the report (what the docs did not answer).
  7. - README.md (API, Test, deploy, permissions), DECISIONS.md, lib/tickets.hl (moveToProject at ~l.126 is the #20 migration write: it keeps the old number; the move needs a NEW number in the target), lib/migrate.hl (how old paths/old numbers redirect: ticketByOld etc.).
  8. ## Requirements (NOT HIS: conductor's detail)
  9. - Permission: caller must be admin of the source AND the target project; otherwise 403, nothing changes. Write this in README (API section + permissions).
  10. - New number = next free number in the target (respect numberFloor if present). Ticket keeps its id, comments, history, relations (links in both directions keep working, rendered with the new path).
  11. - One history event in the ticket/target and one in the source project (e.g. "moved to mpackdb#7" / "moved from miserit-anthar#66"), visible in HTML and in the Markdown view, and delivered on GET /api/events (existing consumers must not break: additive only; check README "API").
  12. - Old URL /<oldslug>/<n> (HTML, Markdown, and the API ticket path) answers 301 to the new one, permanently, also after more moves. The old number in the source is never reused for a new ticket.
  13. - State: if the target lacks the ticket's state name, choose a defined rule and document it.
  14. - UI: a "Move" control on the ticket page, shown only to users who are admin of the source and at least one other project; a form with a project select and a submit button (F7, no hand-written JS, styles in the component's Style {}, 390 px first, taps ≥ 44 px). Afterwards navigate to the new URL.
  15. - Tests: add a gate test that fails on the old code (API 403/200, new number, 301, events, relations, history in both projects). All gates in README "Test" 0 failed.
  16. ## Rules
  17. - Scratch: /media/STORAGE/claude-scratch/tickets/M32/ (worktree, logs, test storage, REPORT.md). Ports 8740–8749 on loreana (check `ss -ltn`). Never touch live storage except through the deployed app.
  18. - Git: PR-only. Branch m32-move, commits titled '|||PR …', no attribution lines. Push the branch; do NOT merge — report the PR number and sha; the conductor reviews and merges, then tells you to deploy.
  19. - Deploy (after the conductor's merge GO): /media/STORAGE/projects/WorldAPI/worldapi-conductor/deploy-init.sh for tickets, run IN THE BACKGROUND with ≥30 min, never under a short timeout; grep /media/STORAGE/claude-scratch/atlas/deploy/initdeploy-tickets.log for rc=0 and FAILED. Never deploy.sh --skip-tests.
  20. - Live proof on project push-test (test data only there; if it does not exist or you are not admin, say so and stop): create two test tickets in push-test, a relation between them, a comment; move one to a second test project only if one exists where you are admin — otherwise report what is needed. Show: new URL 200, old URL 301 (curl -sI), Markdown view, relation intact, events. Token: ~/.config/tickets/tickets-token (conductor Tickets; never print or log it; never use any other token).
  21. - Chrome proof on lisbeth :9223 if reachable (CONDUCTOR rules: own tab, closed, no contexts), widths 390 and 1280 of the ticket page with the Move control; paste `curl -s 127.0.0.1:9223/json`.
  22. - Cap: $5 hard. Stop every process you started and list it (name + PID) in the report.
  23. - Report: REPORT.md in scratch, plus a short final message: PR/sha, gates numbers, deploy rc, live proof URLs, DOCS line, open questions.

Branches

Latest commits

  • 5d144817Merge branch 'records-t40' into mainTickets
  • 44ee6f06|||PR records: #43 #45 livemre
  • b8fdeee9Merge branch 'p39-routes' into mainTickets
  • a0187a0a|||PR Remove redundant route-order loopmre
  • 369e4b9cMerge branch 'k40-lists' into mainTickets
  • 9af8e780|||PR Use keyed list mutations for live ticket updatesmre
  • 610d8e8aMerge branch 'records-t39' into mainTickets
  • 32bcdf24|||PR records: GO P39 K40mre
  • 4123c6d1Merge branch 'records-t38' into mainTickets
  • cd3641a1|||PR records: day72 deploy live, tickets closedmre
  • 7d44d852Merge branch 'records-t37' into mainTickets
  • 926f7061|||PR records: merges, D36 deploymre
  • bf58534eMerge branch 'l33-final' into mainTickets
  • 759a9ac3|||PR thin login (tickets#46, #45): merge main, route entry cleanupmre
  • 239436d8Merge remote-tracking branch 'origin/main' into l33-finalmre
  • 5822cb3aMerge branch 'o34-clean' into mainTickets
  • 0870653c|||PR offline note from __hlOnline, no polling (tickets#41)mre
  • 14cf96b4Merge branch 'records-t36' into mainTickets
  • 07749fa1|||PR records: day72 + #40 mergedmre
  • ecd7e226|||PR Consolidate login and move handler logic into topic libraries (partial)mre