log-worklogs
Log Tempo timesheet entries to Jira worklogs from a freeform bullet list. Use when the user asks to log Tempo hours, post worklogs, add time to Jira, log time for yesterday/today/<date>, update their daily timesheet, or pastes a list of `> TICKET-KEY :: Nh` blocks. Also trigger on phrases like "log my tempo hours", "post my hours", "add worklog for <TICKET>", "log time for <date>".
- License 许可
- MIT
- 最近更新
- 2026-09-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- log-worklogs
- description
- Log Tempo timesheet entries to Jira worklogs from a freeform bullet list. Use when the user asks to log Tempo hours, post worklogs, add time to Jira, log time for yesterday/today/<date>, update their daily timesheet, or pastes a list of `> TICKET-KEY :: Nh` blocks. Also trigger on phrases like "log my tempo hours", "post my hours", "add worklog for <TICKET>", "log time for <date>".
- allowed-tools
- mcp__plugin_atlassian_atlassian__addWorklogToJiraIssue, mcp__plugin_atlassian_atlassian__getJiraIssue, Bash
03 SKILL.md 正文
Log worklogs
Parse a freeform list of ticket entries with hours and bullets, then post each one as a Jira worklog via the Atlassian MCP plugin. Tempo reads Jira worklogs directly, so they appear in the Tempo timesheet automatically , never use a browser or the Tempo UI (the Connect iframe makes it painfully slow).
Input format
The user pastes blocks like:
> TICKET-KEY :: <duration>
(optional header line, e.g. "Catch-up / Planning")
- bullet 1
- bullet 2
- nested sub-bullet
- another sub-bullet
> ANOTHER-KEY :: <duration>
- bullet
- Duration accepts Jira time format:
Nh,Nm,N.Nh,Nh Nm,0.5h, etc. - Description = every indented line after the
> ... ::line, up to the next>or blank line. - Copy description text verbatim. Do not reword, summarize, or strip leading
(...)headers. Bullets stay bullets. - Preserve bullet nesting. Bullets indented deeper than their siblings are sub-bullets , keep their relative indentation so they render as nested sublists, not flattened to a single level.
Date resolution
The user may say "yesterday", "today", "Monday", "May 13", or give an explicit date.
- Resolve relative dates against the timezone in User context below.
- Default to today if unspecified.
- If ambiguous (e.g., "Monday" with no week context), ask which week before posting.
Steps
-
Parse all entries first. If any block fails to parse, stop and ask the user to clarify before posting anything , no partial logging.
-
Sanity-check totals. Sum the durations. If the total exceeds 8h, surface the breakdown and ask the user to confirm. Could be intentional (overtime) or a typo (e.g.,
5hinstead of0.5h). -
Validate unknown ticket keys. For any ticket key that is not in the shorthand list below, call
getJiraIssueto confirm it exists. If it 404s, stop and ask. -
Duplicate guard (best-effort). If the user explicitly mentions a past date and the bullets look identical to recent ones for the same ticket, flag it before posting. Otherwise proceed , duplicate detection across the full Jira worklog history isn't worth the API cost for the common case.
-
Post worklogs in parallel. In a single message, dispatch all
addWorklogToJiraIssuecalls at once. For each entry:cloudId: the Atlassian site from User contextissueIdOrKey: the ticket keytimeSpent: the parsed duration string (e.g.,1h,2h30m,0.5h)started: ISO 8601 with the target date and staggered hours (09:00, 10:00, 11:00, ... UTC) so multiple entries on the same day don't overlap each other on the Tempo timelinecommentBody: the description verbatim , keep the(...)header line if present, keep the bullet markers (-) intact, and preserve the indentation of nested bullets. Normalize each nesting level to 4 spaces of indentation relative to its parent (strip any trailing whitespace on lines, but never collapse leading indentation that signals nesting).contentFormat:"markdown", Jira auto-converts-prefixes into a proper bulletList in ADF, and indented-lines into nestedbulletLists within their parentlistItem
-
Print a summary table. After all calls complete:
| Ticket | Hours | Worklog ID | |---|---|---| | ... | ... | ... | | **Total** | **Nh** | |Then tell the user to refresh the Tempo timesheet to see the entries.
-
Failure handling. If any worklog call fails, report which entries succeeded and which failed with the error message. Do not retry blindly , ask how to proceed.
User context (defaults, fill in per person)
- Atlassian site:
<yourorg>.atlassian.net - Timezone:
<IANA zone the timesheet is kept in, e.g. America/Toronto> - Common shorthand keys (skip validation for these):
TIME-1→ General meetings (not project specific)TIME-2→ General non-project workPROJ-*→ main product project
Do NOT
- Use a browser or the Tempo UI. Tempo reads Jira worklogs, so the API is the right path and is ~50× faster.
- Reword, summarize, or "clean up" bullet text. Copy verbatim, including grammar quirks.
- Flatten nested bullets to a single level. Preserve the indentation hierarchy so sub-bullets stay nested under their parent.
- Post anything if the parse is incomplete or the daily total looks wrong , ask first.
- Retry on partial failure , surface what happened, let the user decide.
- Assume timezone , if the user is in a different TZ for a trip, ask before resolving "yesterday/today".
Example invocation
User:
Please log my tempo hours for yesterday:
> TIME-2 :: 1h (Catch-up / Planning) - reviewed slack - groomed TODOs > PROJ-1234 :: 3h - investigated s3 output option - finalized design doc
Expected behavior:
- Resolve "yesterday" → ISO date in the configured timezone.
- Parse 2 entries totaling 4h (under 8h, no confirmation needed).
- Skip ticket validation (
TIME-2andPROJ-*are known shorthand). - Dispatch 2
addWorklogToJiraIssuecalls in parallel with staggeredstartedtimes. - Print summary table; remind user to refresh Tempo.
04 同仓库更多 Skills
yes-no
Answer the user's question with a yes or no, optionally followed by a short explanation when the model sees fit. Use when the user types "/yes-no", asks a yes/no question and wants a decisive answer, or says "just yes or no".
sonar-workflow
Fix SonarQube code quality issues for a pull request. Auto-fixes trivial issues (formatting, unused imports) and requests approval for complex issues (security, bugs). Integrates with commit-workflow and pr-workflow skills.
short-answer
Answer the user's question as concisely as possible, a direct, to-the-point response with no preamble, filler, or unnecessary elaboration. Use when the user types "/short-answer", asks for a brief/short/concise/TL;DR answer, or says "just the answer".
redash
Query a Redash instance over its REST API , list data sources and saved queries, read a saved query's SQL, run it, or run ad-hoc read-only SQL and get the rows back. Use when the user asks about Redash, a Redash query/dashboard/link, "run that query", "what does query 1234 return", or wants numbers out of an analytics data source rather than the application DB.
prod-db-postgres
暂无简介
prod-db-mysql-bastion
暂无简介