All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
GLPI helpdesk workflow skills written against the portable tools/glpi/ tooling (session-init.sh, ticket-list.sh, ticket-create.sh), cross-linked via [[glpi-*]]: - glpi-solve — close a ticket by setting status Solved (5); GLPI auto-closes - glpi-followup — add a followup via the top-level /ITILFollowup endpoint - glpi-sweep — read-only hunt for done-but-open tickets needing Solve - glpi-list — query tickets by status/recency - glpi-create — open a new ticket Core rule encoded: completing work means setting status Solved, not just posting a resolution followup (a followup documents; only Solved auto-closes). Note: illustrative examples in the bodies are USC-flavored (M2M / helpdesk ticket numbers) and can be genericized in review if preferred. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019GjBgrb9tHgvq414Fqj37c
1.8 KiB
1.8 KiB
Skill: glpi-followup — Add a Followup to a GLPI Ticket
Post a followup (comment / progress note / resolution writeup) to a GLPI ticket. This documents work but does not change the ticket status — to close a ticket out, follow with glpi-solve to set status to Solved.
When to use
- Recording progress, a decision, or a root-cause/resolution note on a ticket.
- The documentation step that usually precedes closing a ticket out (
glpi-solve).
Critical quirk
Use the top-level /ITILFollowup endpoint, NOT /Ticket/<id>/ITILFollowup. The
sub-resource path returns permission errors even with a Super-Admin profile.
Procedure
1. Session + creds
SESSION=$(~/.config/mosaic/tools/glpi/session-init.sh -q)
source ~/.config/mosaic/tools/_lib/credentials.sh && load_credentials glpi
2. Post the followup
TICKET_ID=<id>
CONTENT="<the followup text>"
curl -sk -X POST "${GLPI_URL}/ITILFollowup" \
-H "App-Token: $GLPI_APP_TOKEN" \
-H "Session-Token: $SESSION" \
-H "Content-Type: application/json" \
-d "$(jq -n --argjson id "$TICKET_ID" --arg c "$CONTENT" \
'{input:{itemtype:"Ticket", items_id:$id, content:$c}}')"
Expect HTTP 201. Building the payload with jq keeps quotes/newlines in the content safe.
3. Long or multi-paragraph content
Write the note to a file first, then read it into the payload:
curl -sk -X POST "${GLPI_URL}/ITILFollowup" \
-H "App-Token: $GLPI_APP_TOKEN" -H "Session-Token: $SESSION" \
-H "Content-Type: application/json" \
-d "$(jq -n --argjson id "$TICKET_ID" --rawfile c /path/to/note.md \
'{input:{itemtype:"Ticket", items_id:$id, content:$c}}')"
Guardrails
- Never echo the GLPI app/user/session tokens.
- A followup alone leaves the ticket open. If the work is done, run glpi-solve next.